1G'MIC(1) General Commands Manual G'MIC(1)
2
3
4
6 gmic - Perform image processing operations using the G'MIC framework.
7
8
10 gmic: GREYC's Magic for Image Computing.
11 (https://gmic.eu)
12
13 Version 2.7.0
14 Copyright (c) 2008-2019, David Tschumperle / GREYC Lab / CNRS.
15 (https://www.greyc.fr)
16
17 1. Usage
18
19 gmic [command1 [arg1_1,arg1_2,..]] .. [commandN [argN_1,argN_2,..]]
20
21 'gmic' is the open-source interpreter of the G'MIC language, a
22 script-based programming
23 language dedicated to the design of possibly complex image process‐
24 ing pipelines and operators.
25 It can be used to convert, manipulate, filter and visualize image
26 datasets made of one
27 or several 1D/2D or 3D multi-spectral images.
28
29 This reference documentation describes all the technical rules gov‐
30 erning the G'MIC language.
31 As a starting point, you may want to visit our detailed tutorial
32 pages, at:
33 https://gmic.eu/tutorial/
34
35 2. Overall context
36
37 - At any time, G'MIC manages one list of numbered (and optionally
38 named) pixel-based images,
39 entirely stored in computer memory (uncompressed).
40
41 - The first image of the list has index '0' and is denoted by '[0]'.
42 The second image of the
43 list is denoted by '[1]', the third by '[2]' and so on.
44
45 - Negative indices are treated in a periodic way: '[-1]' refers to
46 the last image of the list,
47 '[-2]' to the penultimate one, etc. Thus, if the list has 4
48 images, '[1]' and '[-3]' both
49 designate the second image of the list.
50
51 - A named image may be also indicated by '[name]', if 'name' uses the
52 character set [a-zA-Z0-9_]
53 and does not start with a number. Image names can be set or reas‐
54 signed at any moment during
55 the processing pipeline (see command 'name' for this purpose).
56
57 - G'MIC defines a set of various commands and substitution mechanisms
58 to allow the design of
59 complex pipelines and operators managing this list of images, in a
60 very flexible way:
61 You can insert or remove images in the list, rearrange image
62 order, process images
63 (individually or grouped), merge image data together, display and
64 output image files, etc.
65
66 - Such a pipeline can be then added as a new custom G'MIC command
67 (stored in a user
68 command file), so it can be re-used afterwards in a larger pipe‐
69 line if necessary.
70
71 3. Image definition and terminology
72
73 - In G'MIC, each image is modeled as a 1D, 2D, 3D or 4D array of
74 scalar values, uniformly
75 discretized on a rectangular/parallelepipedic domain.
76
77 - The four dimensions of this array are respectively denoted by:
78
79 . 'width', the number of image columns (size along the 'x'-axis).
80 . 'height', the number of image rows (size along the 'y'-axis).
81 . 'depth', the number of image slices (size along the 'z'-axis).
82 (the depth is equal to 1 for usual color or grayscale 2D
83 images).
84 . 'spectrum', the number of image channels (size along the
85 'c'-axis).
86 (the spectrum is respectively equal to 3 and 4 for usual RGB
87 and RGBA color images).
88
89 - There are no hard limitations on the size of the image along each
90 dimension. For instance,
91 the number of image slices or channels can be of arbitrary size
92 within the limits of
93 the available memory.
94
95 - The width, height and depth of an image are considered as spatial
96 dimensions, while the
97 spectrum has a multi-spectral meaning. Thus, a 4D image in G'MIC
98 should be most often
99 regarded as a 3D dataset of multi-spectral voxels. Most of the
100 G'MIC commands will stick with
101 this idea (e.g. command 'blur' blurs images only along the spatial
102 'xyz'-axes).
103
104 - G'MIC stores all the image data as buffers of 'float' values (32
105 bits, value range
106 [-3.4E38,+3.4E38]). It performs all its image processing opera‐
107 tions with floating point
108 numbers. Each image pixel takes then 32bits/channel (except if
109 double-precision buffers have
110 been enabled during the compilation of the software, in which case
111 64bits/channel can be the
112 default).
113
114 - Considering 'float'-valued pixels ensure to keep the numerical pre‐
115 cision when executing
116 image processing pipelines. For image input/output operations, you
117 may want to prescribe the
118 image datatype to be different than 'float' (like 'bool', 'char',
119 'int', etc...).
120 This is possible by specifying it as a file option when using I/O
121 commands.
122 (see section 'Input/output properties' to learn more about file
123 options).
124
125 4. Items of a processing pipeline
126
127 - In G'MIC, an image processing pipeline is described as a sequence
128 of items separated by the
129 space character ' '. Such items are interpreted and executed from
130 the left to the right.
131 For instance, the expression:
132
133 filename.jpg blur 3,0 sharpen 10 resize 200%,200% output
134 file_out.jpg
135
136 defines a valid pipeline composed of nine G'MIC items.
137
138 - Each G'MIC item is a string that is either a command, a list of
139 command arguments,
140 a filename, or a special input string.
141
142 - Escape characters '\' and double quotes '"' can be used to define
143 items containing spaces or
144 other special characters. For instance, the two strings 'single\
145 item' and '"single item"'
146 both define the same single item, with a space in it.
147
148 5. Input data items
149
150 - If a specified G'MIC item appears to be an existing filename, the
151 corresponding image data
152 are loaded and inserted at the end of the image list (which is
153 equivalent to the use of
154 'input filename').
155
156 - Special filenames '-' and '-.ext' stand for the standard input/out‐
157 put streams, optionally
158 forced to be in a specific 'ext' file format (e.g. '-.jpg' or
159 '-.png').
160
161 - The following special input strings may be used as G'MIC items to
162 create and insert new
163 images with prescribed values, at the end of the image list:
164
165 . '[selection]' or '[selection]xN': Insert 1 or N copies of already
166 existing images.
167 'selection' may represent one or several images
168 (see section 'Command items and selections' to learn more about
169 selections).
170
171 . 'width[%],_height[%],_depth[%],_spectrum[%],_values': Insert a
172 new image with specified
173 size and values (adding '%' to a dimension means 'percentage of
174 the size along the same
175 axis, taken from the last image '[-1]''). Any specified dimen‐
176 sion can be also written as
177 '[image]', and is then set to the size (along the same axis) of
178 the existing specified image
179 [image]. 'values' can be either a sequence of numbers separated
180 by commas ',',
181 or a mathematical expression, as e.g. in input item
182 '256,256,1,3,[x,y,128]' which
183 creates a 256x256 RGB color image with a spatial shading on the
184 red and green channels.
185 (see section 'Mathematical expressions' to learn more about
186 mathematical expressions).
187
188 . '(v1,v2,..)': Insert a new image from specified prescribed val‐
189 ues. Value separator inside
190 parentheses can be ',' (column separator), ';' (row separator),
191 '/' (slice separator) or
192 '^' (channel separator). For instance, expression
193 '(1,2,3;4,5,6;7,8,9)' creates a
194 3x3 matrix (scalar image), with values running from 1 to 9.
195
196 . '0': Insert a new 'empty' image, containing no pixel data.
197 Empty images are used only in rare occasions.
198
199 - Input item 'name=value' declares a new variable 'name', or assign a
200 new value
201 to an existing variable. Variable names must use the character set
202 [a-zA-Z0-9_] and cannot
203 start with a number.
204
205 - A variable definition is always local to the current command except
206 when it starts by the
207 underscore character '_'. In that case, it becomes also accessible
208 by any command invoked
209 outside the current command scope (global variable).
210
211 - If a variable name starts with two underscores '__', the global
212 variable is also shared among
213 different threads and can be read/set by commands running in par‐
214 allel (see command 'parallel'
215 for this purpose). Otherwise, it remains local to the thread that
216 defined it.
217
218 - Numerical variables can be updated with the use of these special
219 operators:
220 '+=' (addition), '-=' (subtraction), '*=' (multiplication), '/='
221 (division), '%=' (modulo),
222 '&=' (bitwise and), '|=' (bitwise or), '^=' (power), '<<=' and
223 '>>=' (bitwise left and right
224 shifts). For instance, 'foo=1 foo+=3'.
225
226 - Input item 'name.=string' concatenates specified 'string' to the
227 end of variable 'name'.
228
229 - Multiple variable assignments and updates are allowed, with expres‐
230 sions:
231 'name1,name2,...,nameN=value' or
232 'name1,name2,...,nameN=value1,value2,...,valueN'
233 where assignment operator '=' can be replaced by one of the
234 allowed operators
235 (e.g. '+=').
236
237 6. Command items and selections
238
239 - A G'MIC item that is not a filename nor a special input string des‐
240 ignates a command,
241 most of the time. Generally, commands perform image processing
242 operations on one or several
243 available images of the list.
244
245 - Reccurent commands have two equivalent names (regular and short).
246 For instance, command names
247 'resize' and 'r' refer to the same image resizing action.
248
249 - A G'MIC command may have mandatory or optional arguments. Command
250 arguments must be specified
251 in the next item on the command line. Commas ',' are used to sepa‐
252 rate multiple arguments of a
253 single command, when required.
254
255 - The execution of a G'MIC command may be restricted only to a subset
256 of the image list, by
257 appending '[selection]' to the command name. Examples of valid
258 syntaxes for 'selection' are:
259
260 . 'command[-2]': Apply command only on the penultimate image [-2]
261 of the list.
262 . 'command[0,1,3]': Apply command only on images [0],[1] and [3].
263 . 'command[3-6]': Apply command only on images [3] to [6] (i.e,
264 [3],[4],[5] and [6]).
265 . 'command[50%-100%]': Apply command only on the second half of the
266 image list.
267 . 'command[0,-4--1]': Apply command only on the first image and the
268 last four images.
269 . 'command[0-9:3]': Apply command only on images [0] to [9], with a
270 step of 3
271 (i.e. on images [0], [3], [6] and [9]).
272 . 'command[0-9:25%]': Apply command only on images [0] to [9], with
273 a step of 25%
274 (i.e. on images [0], [3], [6] and [9]).
275 . 'command[0--1:2]': Apply command only on images of the list with
276 even indices.
277 . 'command[0,2-4,50%--1]': Apply command on images [0],[2],[3],[4]
278 and on the second half of
279 the image list.
280 . 'command[^0,1]': Apply command on all images except the first
281 two.
282 . 'command[name1,name2]': Apply command on named images 'name1' and
283 'name2'.
284
285 - indices in selections are always sorted in increasing order, and
286 duplicate indices are
287 discarded. For instance, selections '[3-1,1-3]' and '[1,1,1,3,2]'
288 are both equivalent to
289 '[1-3]'. If you want to repeat a single command multiple times on
290 an image, use a
291 'repeat..done' loop instead. Inverting the order of images for a
292 command is achieved by
293 explicitly inverting the order of the images in the list, with
294 command 'reverse[selection]'.
295
296 - Command selections '[-1]','[-2]' and '[-3]' are so often used they
297 have their own
298 shortcuts, respectively '.', '..' and '...'. For instance, command
299 'blur..' is equivalent to
300 'blur[-2]'. These shortcuts work also when specifying command
301 arguments.
302
303 - G'MIC commands invoked without '[selection]' are applied on all
304 images of the list, i.e. the
305 default selection is '[0--1]' (except for command 'input' whose
306 default selection is '[-1]').
307
308 - Prepending a single hyphen '-' to a G'MIC command is allowed. This
309 may be useful to recognize
310 command items more easily in a one-liner pipeline (typically
311 invoked from a shell).
312
313 - A G'MIC command prepended with a plus sign '+' or a double hyphen
314 '--' does not act 'in-place'
315 but inserts its result as one or several new images at the end of
316 the image list.
317
318 - There are two different types of commands that can be run by the
319 G'MIC interpreter:
320
321 . Builtin commands, are the hard-coded functionalities in the
322 interpreter core. They are thus
323 compiled as binary code and run fast, most of the time. Omitting
324 an argument when invoking a
325 builtin command is not permitted, except if all following argu‐
326 ments are also omitted.
327 For instance, invoking 'plasma 10,,5' is invalid but 'plasma 10'
328 is correct.
329 . Custom commands, are defined as G'MIC pipelines of builtin or
330 other custom commands.
331 They are interpreted by the G'MIC interpreter, and thus run a
332 bit slower than builtin commands.
333 Omitting arguments when invoking a custom command is permitted.
334 For instance, expressions
335 'flower ,,,100,,2' or 'flower ,' are correct.
336
337 - Most of the existing commands in G'MIC are actually defined as cus‐
338 tom commands.
339
340 - A user can easily add its own custom commands to the G'MIC inter‐
341 preter (see section
342 'Adding custom commands' for more details). New builtin commands
343 cannot be added
344 (unless you modify the G'MIC interpreter source code and recompile
345 it).
346
347 7. Input/output properties
348
349 - G'MIC is able to read/write most of the classical image file for‐
350 mats, including:
351
352 . 2D grayscale/color files: .png, .jpeg, .gif, .pnm, .tif, .bmp,
353 ...
354 . 3D volumetric files: .dcm, .hdr, .nii, .pan, .inr, .pnk, ...
355 . video files: .mpeg, .avi, .mov, .ogg, .flv, ...
356 . Generic ascii or binary data files: .gmz, .cimg, .cimgz, .dlm,
357 .asc, .pfm, .raw, .txt, .h.
358 . 3D object files: .off.
359
360 - When dealing with color images, G'MIC generally reads, writes and
361 displays data using the usual
362 sRGB color space.
363
364 - G'MIC is able to manage 3D objects that may be read from files or
365 generated by G'MIC commands.
366 A 3D object is stored as a one-column scalar image containing the
367 object data, in the
368 following order: { magic_number; sizes; vertices; primitives; col‐
369 ors; opacities }.
370 These 3D representations can be then processed as regular images.
371 (see command 'split3d' for accessing each of these 3D object data
372 separately).
373
374 - Be aware that usual file formats may be sometimes not adapted to
375 store all the available image
376 data, since G'MIC uses float-valued image buffers. For instance,
377 saving an image that was
378 initially loaded as a 16bits/channel image, as a .jpg file will
379 result in a loss of
380 information. Use the G'MIC-specific file extension .gmz to ensure
381 that all data
382 precision is preserved when saving images.
383
384 - Sometimes, file options may/must be set for file formats:
385
386 . Video files: Only sub-frames of an image sequence may be loaded,
387 using the input expression
388 'filename.ext,[first_frame[,last_frame[,step]]]'. Set
389 'last_frame==-1' to tell it must be
390 the last frame of the video. Set 'step' to 0 to force an opened
391 video file to be
392 opened/closed. Output framerate and codec can be also set by
393 using the output expression
394 'filename.avi,_fps,_codec,_keep_open={ 0 | 1 }'. 'codec' is a
395 4-char string
396 (see http://www.fourcc.org/codecs.php) or '0' for the default
397 codec. 'keep_open'
398 tells if the output video file must be kept open for appending
399 new frames afterwards.
400
401 . .cimg[z] files: Only crops and sub-images of .cimg files can be
402 loaded, using the input
403 expressions 'filename.cimg,N0,N1', 'filename.cimg,N0,N1,x0,x1',
404 'filename.cimg,N0,N1,x0,y0,x1,y1', 'file‐
405 name.cimg,N0,N1,x0,y0,z0,x1,y1,z1' or
406 'filename.cimg,N0,N1,x0,y0,z0,c0,x1,y1,z1,c1'.
407 Specifying '-1' for one coordinates stands for the maximum possi‐
408 ble value. Output expression
409 'filename.cimg[z][,datatype]' can be used to force the output
410 pixel type. 'datatype' can be
411 { auto | uchar | char | ushort | short | uint | int | uint64 |
412 int64 | float | double }.
413
414 . .raw binary files: Image dimensions and input pixel type may be
415 specified when loading .raw
416 files with input expression
417 'filename.raw[,datatype][,width][,height[,depth[,dim[,off‐
418 set]]]]]'. If no dimensions are
419 specified, the resulting image is a one-column vector with maxi‐
420 mum possible height. Pixel
421 type can also be specified with the output expression 'file‐
422 name.raw[,datatype]'.
423 'datatype' can be the same as for .cimg[z] files.
424
425 . .yuv files: Image dimensions must be specified when loading, and
426 only sub-frames of an image sequence
427 may be loaded, using the input expression
428 'filename.yuv,width,height[,chroma_subsam‐
429 pling[,first_frame[,last_frame[,step]]]'.
430 'chroma_subsampling' can be { 420 | 422 | 444 }.
431 When saving, chroma subsampling mode can be specified with out‐
432 put expression
433 'filename.yuv[,chroma_subsampling]'.
434
435 . .tiff files: Only sub-images of multi-pages tiff files can be
436 loaded, using the input
437 expression 'filename.tif,_first_frame,_last_frame,_step'.
438 Output expression 'filename.tiff,_datatype,_compres‐
439 sion,_force_multipage,_use_bigtiff' can
440 be used to specify the output pixel type, as well as the com‐
441 pression method.
442 'datatype' can be the same as for .cimg[z] files. 'compression'
443 can be
444 { none (default) | lzw | jpeg }. 'force_multipage can be { 0=no
445 (default) | 1=yes }.
446 'use_bigtiff can be { 0=no | 1=yes (default) }.
447
448 . .gif files: Animated gif files can be saved, using the input
449 expression
450 'filename.gif,fps>0,nb_loops'. Specify 'nb_loops=0' to get an
451 infinite number of animation
452 loops (this is the default behavior).
453
454 . .jpeg files: The output quality may be specified (in %), using
455 the output expression
456 'filename.jpg,30' (here, to get a 30% quality output). '100' is
457 the default.
458
459 . .mnc files: The output header can set from another file, using
460 the output expression
461 'filename.mnc,header_template.mnc'.
462
463 . .pan, .cpp, .hpp, .c and .h files: The output datatype can be
464 selected with output expression
465 'filename[,datatype]'. 'datatype' can be the same as for
466 .cimg[z] files.
467
468 . .gmic files: These filenames are assumed to be G'MIC custom com‐
469 mands files. Loading such a
470 file will add the commands it defines to the interpreter. Debug
471 information can be
472 enabled/disabled by the input expression 'file‐
473 name.gmic[,add_debug_info={ 0 | 1 }]'.
474
475 . Inserting 'ext:' on the beginning of a filename (e.g. 'jpg:file‐
476 name') forces G'MIC to
477 read/write the file as it would have been done if it had the
478 specified extension '.ext'.
479
480 - Some input/output formats and options may not be supported, depend‐
481 ing on the configuration
482 flags that have been set during the build of the G'MIC software.
483
484 8. Substitution rules
485
486 - G'MIC items containing '$' or '{}' are substituted before being
487 interpreted. Use these
488 substituting expressions to access various data from the inter‐
489 preter environment.
490
491 - '$name' and '${name}' are both substituted by the value of the
492 specified named variable
493 (set previously by the item 'name=value'). If this variable has
494 not been already set, the
495 expression is substituted by the highest positive index of the
496 named image '[name]'. If no
497 image has this name, the expression is substituted by the value of
498 the OS environment variable
499 with same name (it may be thus an empty string).
500 The following reserved variables are predefined by the G'MIC
501 interpreter:
502
503 . '$!': The current number of images in the list.
504 . '$>' and '$<': The increasing/decreasing index of the latest
505 (currently running)
506 'repeat...done' loop. '$>' goes from '0' (first loop itera‐
507 tion) to
508 'nb_iterations - 1' (last iteration). '$>' does the opposite.
509 . '$/': The current call stack. Stack items are separated by
510 slashes '/'.
511 . '$|': The current value (expressed in seconds) of a millisec‐
512 ond precision timer.
513 . '$^': The current verbosity level.
514 . '$_cpus': The number of computation cores available on your
515 machine.
516 . '$_pid': The current process identifier, as an integer.
517 . '$_prerelease': For pre-releases, the date of the pre-release
518 as 'yymmdd'.
519 For stable releases, this variable is set to 0.
520 . '$_version': A 3-digits number telling about the current ver‐
521 sion of the G'MIC interpreter
522 (e.g. '270').
523 . '$_vt100': Set to 1 if colored text output is allowed on the
524 console.
525 Otherwise, set to 0
526 . '$_path_rc': The path to the G'MIC folder used to store
527 resources and configuration files
528 (its value is OS-dependent).
529 . '$_path_user': The path to the G'MIC user file .gmic or
530 user.gmic
531 (its value is OS-dependent).
532
533 - '$$name' and '$${name}' are both substituted by the G'MIC script
534 code of the specified named
535 custom command, or by an empty string if no custom command with
536 specified name exists.
537
538 - '${"-pipeline"}' is substituted by the status value after the exe‐
539 cution of the specified
540 G'MIC pipeline (see command 'status'). Expression '${}' thus
541 stands for the
542 current status value.
543
544 - '{``string}' (starting with two backquotes) is substituted by a
545 double-quoted version of the
546 specified string.
547
548 - '{/string}' is substituted by the escaped version of the specified
549 string.
550
551 - '{'string'}' (between single quotes) is substituted by the sequence
552 of ascii codes that compose
553 the specified string, separated by commas ','. For instance, item
554 '{'foo'}' is substituted
555 by '102,111,111'.
556
557 - '{image,feature}' is substituted by a specific feature of the image
558 [image]. 'image' can be
559 either an image number or an image name. It can be also eluded, in
560 which case, the last image
561 '[-1]' of the list is considered for the requested feature.
562 Specified 'feature' can be one of:
563
564 . 'b': The image basename (i.e. filename without the folder path
565 nor extension).
566 . 'f': The image folder name.
567 . 'n': The image name or filename (if the image has been read
568 from a file).
569 . 't': The text string from the image values regarded as ascii
570 codes.
571 . 'x': The image extension (i.e the characters after the last
572 '.' in the image name).
573 . '^ : The sequence of all image values, separated by commas
574 ','.
575 . '@subset': The sequence of image values corresponding to the
576 specified subset, and
577 separated by commas ','.
578 . Any other 'feature' is considered as a mathematical expression
579 associated to the image
580 [image] and is substituted by the result of its evaluation
581 (float value). For instance,
582 expression '{0,w+h}' is substituted by the sum of the width
583 and height of the first image
584 (see section 'Mathematical expressions' for more details). If
585 a mathematical expression
586 starts with an underscore '_', the resulting value is trun‐
587 cated to a readable format.
588 For instance, item '{_pi}' is substituted by '3.14159' (while
589 '{pi}'
590 is substituted by '3.141592653589793').
591 . A 'feature' delimited by backquotes is replaced by a string
592 whose ascii codes correspond
593 to the list of values resulting from the evaluation of the
594 specified mathematical
595 expression. For instance, item '{`[102,111,111]`}' is substi‐
596 tuted by 'foo' and item
597 '{`vector8(65)`}' by 'AAAAAAAA'.
598
599 - '{*}' is substituted by the visibility state of the instant display
600 window [0]
601 (can be { 0=closed | 1=visible }).
602
603 - '{*,feature1,...,featureN}' or '{*index,feature1,...,featureN}' is
604 substituted by a specific
605 set of features of the instant display window #0 (or #index, if
606 specified).
607 Requested 'features' can be:
608
609 . 'w': display width (i.e. width of the display area managed by
610 the window).
611 . 'h': display height (i.e. height of the display area managed
612 by the window).
613 . 'wh': display width x display height.
614 . 'd': window width (i.e. width of the window widget).
615 . 'e': window height (i.e. height of the window widget).
616 . 'de': window width x window height.
617 . 'u': screen width (actually independent on the window size).
618 . 'v': screen height (actually independent on the window size).
619 . 'uv': screen width x screen height.
620 . 'n': current normalization type of the instant display.
621 . 't': window title of the instant display.
622 . 'x': X-coordinate of the mouse position (or -1, if outside the
623 display area).
624 . 'y': Y-coordinate of the mouse position (or -1, if outside the
625 display area).
626 . 'b': state of the mouse buttons { 1=left-but. | 2=right-but. |
627 4=middle-but. }.
628 . 'o': state of the mouse wheel.
629 . 'k': decimal code of the pressed key if any, 0 otherwise.
630 . 'c': boolean (0 or 1) telling if the instant display has been
631 closed recently.
632 . 'r': boolean telling if the instant display has been resized
633 recently.
634 . 'm': boolean telling if the instant display has been moved
635 recently.
636 . Any other 'feature' stands for a keycode name (in capital let‐
637 ters), and is substituted
638 by a boolean describing the current key state { 0=pressed |
639 1=released }.
640 . You can also prepend a hyphen '-' to a 'feature' (that sup‐
641 ports it) to flush the
642 corresponding event immediately after reading its state
643 (works for keys, mouse and
644 window events).
645
646 - Item substitution is never performed in items between double
647 quotes. One must break the quotes
648 to enable substitution if needed, as in '"3+8 kg = "{3+8}" kg"'.
649 Using double quotes is then
650 a convenient way to disable the substitutions mechanism in items,
651 when necessary.
652
653 - One can also disable the substitution mechanism on items outside
654 double quotes, by escaping the
655 '{','}' or '$' characters, as in '\{3+4\}\ doesn't\ evaluate'.
656
657 9. Mathematical expressions
658
659 - G'MIC has an embedded mathematical parser. It is used to evaluate
660 (possibly complex) expressions
661 inside braces '{}', or formulas in commands that may take one as
662 an argument (e.g. 'fill').
663
664 - When the context allows it, a formula is evaluated for each pixel
665 of the selected images
666 (e.g. 'fill').
667
668 - A math expression may return a scalar or vector-valued result (with
669 a fixed number of
670 components).
671
672 - The mathematical parser understands the following set of functions,
673 operators and variables:
674
675 _ Usual operators: || (logical or), && (logical and), | (bitwise
676 or), & (bitwise and),
677 !=, ==, <=, >=, <, >, << (left bitwise shift), >> (right bitwise
678 shift), -, +, *, /,
679 % (modulo), ^ (power), ! (logical not), ~ (bitwise not),
680 ++, --, +=, -=, *=, /=, %=, &=, |=, ^=, >>=, <<= (in-place oper‐
681 ators).
682
683 _ Usual math functions: abs(), acos(), acosh(), arg(), argkth(),
684 argmax(), argmin(), asin(),
685 asinh(), atan(), atan2(), atanh(), avg(), bool(), cbrt(),
686 ceil(), cos(), cosh(), cut(), exp(), fact(),
687 fibo(), floor(), gauss(), int(), isnan(), isnum(), isinf(),
688 isint(), isbool(), isexpr(), isfile(), isdir(),
689 isin(), kth(), log(), log2(), log10(), max(), med(), min(),
690 narg(), prod(), rol() (left bit rotation),
691 ror() (right bit rotation), round(), sign(), sin(), sinc(),
692 sinh(), sqrt(), std(),
693 srand(_seed), sum(), tan(), tanh(), var(), xor().
694
695 . 'atan2(y,x)' is the version of 'atan()' with two arguments 'y'
696 and 'x' (as in C/C++).
697 . 'permut(k,n,with_order)' computes the number of permutations
698 of k objects from a set of
699 n objects.
700 . 'gauss(x,_sigma,_is_normalized)' returns
701 'exp(-x^2/(2*s^2))/(is_normalized?sqrt(2*pi*sigma^2):1)'.
702 . 'cut(value,min,max)' returns value if it is in range
703 [min,max], or min or max otherwise.
704 . 'narg(a_1,...,a_N)' returns the number of specified arguments
705 (here, N).
706 . 'arg(i,a_1,..,a_N)' returns the ith argument a_i.
707 . 'isnum()', 'isnan()', 'isinf()', 'isint()', 'isbool()' test
708 the type of the given
709 number or expression, and return 0 (false) or 1 (true).
710 . 'isfile('path')' (resp. 'isdir('path')') returns 0 (false) or
711 1 (true) whether its string argument is a
712 path to an existing file (resp. to a directory) or not.
713 . 'isin(v,a_1,...,a_n)' returns 0 (false) or 1 (true) whether
714 the first value 'v' appears
715 in the set of other values 'a_i'.
716 . 'argmin()', 'argmax()', 'avg()', 'kth()', 'max()', 'med()',
717 'min()', 'std()', 'sum()'
718 and 'var()' can be called with an arbitrary number of
719 scalar/vector arguments.
720 . 'round(value,rounding_value,direction)' returns a rounded
721 value. 'direction' can be
722 { -1=to-lowest | 0=to-nearest | 1=to-highest }.
723
724 _ Variable names below are pre-defined. They can be overridden.
725
726 . 'l': length of the associated list of images.
727 . 'w': width of the associated image, if any (0 otherwise).
728 . 'h': height of the associated image, if any (0 otherwise).
729 . 'd': depth of the associated image, if any (0 otherwise).
730 . 's': spectrum of the associated image, if any (0 otherwise).
731 . 'r': shared state of the associated image, if any (0 other‐
732 wise).
733 . 'wh': shortcut for width x height.
734 . 'whd': shortcut for width x height x depth.
735 . 'whds': shortcut for width x height x depth x spectrum (i.e.
736 number of image values).
737 . 'im','iM','ia','iv','is','ip','ic': Respectively the minimum,
738 maximum, average,
739 variance, sum, product and median value of the associated
740 image, if any (0 otherwise).
741 . 'xm','ym','zm','cm': The pixel coordinates of the minimum
742 value
743 in the associated image, if any (0 otherwise).
744 . 'xM','yM','zM','cM': The pixel coordinates of the maximum
745 value
746 in the associated image, if any (0 otherwise).
747 . All these variables are considered as constant values by the
748 math parser (for optimization
749 purposes) which is indeed the case most of the time. Anyway,
750 this might not be the case,
751 if function 'resize(#ind,..)' is used in the math expression.
752 If so, it is safer to invoke functions 'l()', 'w(_#ind)',
753 'h(_#ind)', ... 's(_#ind)'
754 and 'ic(_#ind)' instead of the corresponding named variables.
755 . 'i': current processed pixel value (i.e. value located at
756 (x,y,z,c)) in the associated
757 image, if any (0 otherwise).
758 . 'iN': Nth channel value of current processed pixel (i.e. value
759 located at (x,y,z,N)) in
760 the associated image, if any (0 otherwise). 'N' must be an
761 integer in range [0,9].
762 . 'R','G','B' and 'A' are equivalent to 'i0', 'i1', 'i2' and
763 'i3' respectively.
764 . 'I': current vector-valued processed pixel in the associated
765 image, if any (0 otherwise).
766 The number of vector components is equal to the number of
767 image channels
768 (e.g. I = [ R,G,B ] for a RGB image).
769 . You may add '#ind' to any of the variable name above to
770 retrieve the information for any
771 numbered image [ind] of the list (when this makes sense). For
772 instance 'ia#0' denotes
773 the average value of the first image of the list).
774 . 'x': current processed column of the associated image, if any
775 (0 otherwise).
776 . 'y': current processed row of the associated image, if any (0
777 otherwise).
778 . 'z': current processed slice of the associated image, if any
779 (0 otherwise).
780 . 'c': current processed channel of the associated image, if any
781 (0 otherwise).
782 . 't': thread id when an expression is evaluated with multiple
783 threads (0 means
784 'master thread').
785 . 'e': value of e, i.e. 2.71828...
786 . 'pi': value of pi, i.e. 3.1415926...
787 . 'u': a random value between [0,1], following a uniform distri‐
788 bution.
789 . 'g': a random value, following a gaussian distribution of
790 variance 1
791 (roughly in [-6,6]).
792 . 'interpolation': value of the default interpolation mode used
793 when reading pixel values
794 with the pixel access operators (i.e. when the interpolation
795 argument is not explicitly
796 specified, see below for more details on pixel access opera‐
797 tors). Its initial default
798 value is 0.
799 . 'boundary': value of the default boundary conditions used when
800 reading pixel values with
801 the pixel access operators (i.e. when the boundary condition
802 argument is not explicitly
803 specified, see below for more details on pixel access opera‐
804 tors). Its initial default
805 value is 0.
806
807 _ Vector calculus: Most operators are also able to work with vec‐
808 tor-valued elements.
809
810 . '[ a0,a1,...,aN-1 ]' defines a N-dimensional vector with
811 scalar coefficients ak.
812 . 'vectorN(a0,a1,,...,aN-1)' does the same, with the ak being
813 repeated periodically if
814 only a few are specified.
815 . 'vector(#N,a0,a1,,...,aN-1)' does the same, and can be used
816 for any constant expression N.
817 . In previous expressions, the ak can be vectors themselves, to
818 be concatenated into a
819 single vector.
820 . The scalar element ak of a vector X is retrieved by 'X[k]'.
821 . The sub-vector [ X[p],X[p+s]...X[p+s*(q-1)] ] (of size q) of a
822 vector X
823 is retrieved by 'X[p,q,s]'.
824 . Equality/inequality comparisons between two vectors is done
825 with operators '==' and '!='.
826 . Some vector-specific functions can be used on vector values:
827 'cross(X,Y)' (cross product), 'dot(X,Y)' (dot product),
828 'size(X)' (vector dimension),
829 'sort(X,_is_increasing,_chunk_size)' (sorting values),
830 'reverse(A)' (reverse order of
831 components), 'shift(A,_length,_boundary_conditions)' and
832 'same(A,B,_nb_vals,_is_case_sensitive)' (vector equality
833 test).
834 . Function 'normP(u1,...,un)' computes the LP-norm of the speci‐
835 fied vector
836 (P being an unsigned integer constant or 'inf'). If P is
837 omitted, the L2 norm is used.
838 . Function 'resize(A,size,_interpolation,_boundary_conditions)'
839 returns a resized version of
840 a vector 'A' with specified interpolation mode. 'interpola‐
841 tion' can be { -1=none
842 (memory content) | 0=none | 1=nearest | 2=average | 3=linear
843 | 4=grid | 5=bicubic |
844 6=lanczos }, and 'boundary_conditions' can be { 0=dirichlet
845 | 1=neumann | 2=periodic | 3=mirror }.
846 . Function 'find(A,B,_is_forward,_starting_index)' returns the
847 index where sub-vector B
848 appears in vector A, (or -1 if B is not found in A). Argument
849 A can be also replaced by
850 an image index #ind.
851 . A 2-dimensional vector may be seen as a complex number and
852 used in those particular
853 functions/operators:
854 '**' (complex multiplication), '//' (complex division), '^^'
855 (complex exponentiation),
856 '**=' (complex self-multiplication), '//=' (complex self-
857 division), '^^=' (complex
858 self-exponentiation), 'cabs()' (complex modulus), 'carg()'
859 (complex argument), 'cconj()'
860 (complex conjugate), 'cexp()' (complex exponential) and
861 'clog()' (complex logarithm).
862 . A MN-dimensional vector may be seen as a M x N matrix and used
863 in those
864 particular functions/operators:
865 '*' (matrix-vector multiplication), 'det(A)' (determinant),
866 'diag(V)' (diagonal matrix
867 from a vector), 'eig(A)' (eigenvalues/eigenvectors), 'eye(n)'
868 (n x n identity matrix),
869 'inv(A)' (matrix inverse), 'mul(A,B,_nb_colsB)' (matrix-
870 matrix multiplication),
871 'pseudoinv(A,_nb_colsA)', 'rot(u,v,w,angle)' (3D rotation
872 matrix), 'rot(angle)' (2D
873 rotation matrix), 'solve(A,B,_nb_colsB)' (least-square solver
874 of linear system A.X = B),
875 'svd(A,_nb_colsA)' (singular value decomposition), 'trace(A)'
876 (matrix trace) and
877 'transp(A,nb_colsA)' (matrix transpose). Argument 'nb_colsB'
878 may be omitted if it is
879 equal to 1.
880 . Specifying a vector-valued math expression as an argument of a
881 command that operates on
882 image values (e.g. 'fill') modifies the whole spectrum range
883 of the processed image(s),
884 for each spatial coordinates (x,y,z). The command does not
885 loop over the C-axis in this
886 case.
887
888 _ String manipulation: Character strings are defined and managed as
889 vectors objects.
890 Dedicated functions and initializers to manage strings are
891
892 . [ 'string' ] and 'string' define a vector whose values are the
893 ascii codes of the
894 specified character string (e.g. 'foo' is equal to [
895 102,111,111 ]).
896 . _'character' returns the (scalar) ascii code of the specified
897 character (e.g. _'A' is
898 equal to 65).
899 . A special case happens for empty strings: Values of both
900 expressions [ '' ] and '' are 0.
901 . Functions 'lowercase()' and 'uppercase()' return string with
902 all string characters
903 lowercased or uppercased.
904 . Function 'stov(str,_starting_index,_is_strict)' parses speci‐
905 fied string 'str' and
906 returns the value contained in it.
907 . Function 'vtos(expr,_nb_digits,_siz)' returns a vector of size
908 'siz' which contains
909 the ascii representation of values described by expression
910 'expr'.
911 'nb_digits' can be { -1=auto-reduced | 0=all | >0=max number
912 of digits }.
913 . Function 'echo(str1,str2,...,strN)' prints the concatenation
914 of given string arguments
915 on the console.
916 . Function 'cats(str1,str2,...,strN,siz)' returns the concatena‐
917 tion of given string arguments
918 as a new vector of size 'siz'.
919
920 _ Special operators can be used:
921
922 . ';': expression separator. The returned value is always the
923 last encountered expression.
924 For instance expression '1;2;pi' is evaluated as 'pi'.
925 . '=': variable assignment. Variables in mathematical parser can
926 only refer to numerical
927 values (vectors or scalars). Variable names are case-sensi‐
928 tive. Use this operator in
929 conjunction with ';' to define more complex evaluable expres‐
930 sions, such as
931 't=cos(x);3*t^2+2*t+1'.
932 These variables remain local to the mathematical parser and
933 cannot be accessed outside
934 the evaluated expression.
935 . Variables defined in math parser may have a constant property,
936 by specifying keyword 'const'
937 before the variable name (e.g. 'const foo = pi/4;'). The
938 value set to such a variable must
939 be indeed a constant scalar. Constant variables allows cer‐
940 tain types of optimizations in
941 the math JIT compiler.
942
943 _ The following specific functions are also defined:
944
945 . 'u(max)' or 'u(min,max)': return a random value between
946 [0,max] or [min,max], following
947 a uniform distribution.
948 . 'i(_a,_b,_c,_d,_interpolation_type,_boundary_conditions)':
949 return the value of the pixel
950 located at position (a,b,c,d) in the associated image, if any
951 (0 otherwise).
952 'interpolation_type' can be { 0=nearest neighbor | 1=linear |
953 2=cubic }.
954 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
955 2=periodic | 3=mirror }.
956 Omitted coordinates are replaced by their default values
957 which are respectively
958 x, y, z, c, interpolation and boundary.
959 For instance command 'fill 0.5*(i(x+1)-i(x-1))' will estimate
960 the X-derivative of an
961 image with a classical finite difference scheme.
962 . 'j(_dx,_dy,_dz,_dc,_interpolation_type,_boundary_conditions)'
963 does the same for the pixel
964 located at position (x+dx,y+dy,z+dz,c+dc) (pixel access rela‐
965 tive to the current
966 coordinates).
967 . 'i[offset,_boundary_conditions]' returns the value of the
968 pixel located at specified
969 'offset' in the associated image buffer (or 0 if offset is
970 out-of-bounds).
971 . 'j[offset,_boundary_conditions]' does the same for an offset
972 relative to the current pixel
973 coordinates (x,y,z,c).
974 . 'i(#ind,_x,_y,_z,_c,_interpolation,_boundary_conditions)',
975 'j(#ind,_dx,_dy,_dz,_dc,_interpolation,_boundary_condi‐
976 tions)',
977 'i[#ind,offset,_boundary_conditions]' and 'i[offset,_bound‐
978 ary_conditions]' are similar
979 expressions used to access pixel values for any numbered
980 image [ind] of the list.
981 . 'I/J[offset,_boundary_conditions]' and
982 'I/J(#ind,_x,_y,_z,_interpolation,_boundary_conditions)' do
983 the same as 'i/j[offset,_boundary_conditions]' and
984 'i/j(#ind,_x,_y,_z,_c,_interpolation,_boundary_conditions)'
985 but return a vector instead of a scalar
986 (e.g. a vector [ R,G,B ] for a pixel at (a,b,c) in a color
987 image).
988 . 'sort(#ind,_is_increasing,_axis)' sorts the values in the
989 specified image [ind].
990 . 'crop(_#ind,_x,_y,_z,_c,_dx,_dy,_dz,_dc,_boundary_conditions)'
991 returns a vector whose values come
992 from the cropped region of image [ind] (or from default image
993 selected if 'ind' is not
994 specified). Cropped region starts from point (x,y,z,c) and
995 has a size of
996 dx x dy x dz x dc. Arguments for coordinates and sizes can be
997 omitted if they are not
998 ambiguous (e.g. 'crop(#ind,x,y,dx,dy)' is a valid invocation
999 of this function).
1000 . 'draw(_#ind,S,x,y,z,c,dx,_dy,_dz,_dc,_opacity,_M,_max_M)'
1001 draws a sprite S in image [ind]
1002 (or in default image selected if 'ind' is not specified) at
1003 coordinates (x,y,z,c).
1004 The size of the sprite dx x dy x dz x dc must be specified.
1005 You can also specify a
1006 corresponding opacity mask M if its size matches S.
1007 . 'polygon(_#ind,nb_vertices,coords,_opacity,_color)' draws a
1008 filled polygon in image [ind]
1009 (or in default image selected if 'ind' is not specified) at
1010 specified coordinates.
1011 It draws a single line if 'nb_vertices' is set to 2.
1012 . 'polygon(_#ind,-nb_vertices,coords,_opacity,_pattern,_color)'
1013 draws a outlined polygon in image [ind]
1014 (or in default image selected if 'ind' is not specified) at
1015 specified coordinates and with
1016 specified line pattern. It draws a single line if 'nb_ver‐
1017 tices' is set to 2.
1018 . 'ellipse(_#ind,xc,yc,radius1,_radius2,_angle,_opacity,_color)'
1019 draws a filled ellipse in image [ind]
1020 (or in default image selected if 'ind' is not specified) with
1021 specified coordinates.
1022 . 'ellipse(_#ind,xc,yc,-radius1,-_radius2,_angle,_opacity,_pat‐
1023 tern,_color)' draws an outlined
1024 ellipse in image [ind] (or in default image selected if 'ind'
1025 is not specified).
1026 . 'resize(#ind,w,_h,_d,_s,_interp,_boundary_condi‐
1027 tions,_cx,_cy,_cz,_cc)' resizes an image of the
1028 associated list with specified dimension and interpolation
1029 method. When using this,
1030 function, you should consider retrieving the (non-constant)
1031 image dimensions using the
1032 dynamic functions 'w(_#ind)', 'h(_#ind)', 'd(_#ind)',
1033 's(_#ind)', 'wh(_#ind)',
1034 'whd(_#ind)' and 'whds(_#ind)' instead of the corresponding
1035 constant variables.
1036 . 'if(condition,expr_then,_expr_else)': return value of
1037 'expr_then' or 'expr_else',
1038 depending on the value of 'condition' (0=false, other=true).
1039 'expr_else' can be omitted
1040 in which case 0 is returned if the condition does not hold.
1041 Using the ternary operator
1042 'condition?expr_then[:expr_else]' gives an equivalent expres‐
1043 sion.
1044 For instance, G'MIC commands 'fill if(x%10==0,255,i)' and
1045 'fill x%10?i:255'
1046 both draw blank vertical lines on every 10th column of an
1047 image.
1048 . 'do(expression,_condition)' repeats the evaluation of 'expres‐
1049 sion' until 'condition'
1050 vanishes (or until 'expression' vanishes if no 'condition' is
1051 specified). For instance,
1052 the expression:
1053 'if(N<2,N,n=N-1;F0=0;F1=1;do(F2=F0+F1;F0=F1;F1=F2,n=n-1))' returns
1054 the Nth value of the Fibonacci sequence, for N>=0 (e.g.,
1055 46368 for N=24).
1056 'do(expression,condition)' always evaluates the specified
1057 expression at least once,
1058 then check for the loop condition. When done, it returns the
1059 last value of 'expression'.
1060 . 'for(init,condition,_procedure,body)' first evaluates the
1061 expression 'init', then
1062 iteratively evaluates 'body' (followed by 'procedure' if
1063 specified) while 'condition'
1064 is verified (i.e. not zero). It may happen that no iteration
1065 is done, in which case the
1066 function returns nan. Otherwise, it returns the last value of
1067 'body'.
1068 For instance, the expression:
1069 'if(N<2,N,for(n=N;F0=0;F1=1,n=n-1,F2=F0+F1;F0=F1;F1=F2))'
1070 returns the Nth value of the Fibonacci sequence, for N>=0
1071 (e.g., 46368 for N=24).
1072 . 'while(condition,expression)' is exactly the same as
1073 'for(init,condition,expression)'
1074 without the specification of an initializing expression.
1075 . 'break()' and 'continue()' respectively breaks and continues
1076 the current running bloc
1077 (loop, init or main environment).
1078 . 'fsize('filename')' returns the size of the specified 'file‐
1079 name' (or '-1' if file does not exist).
1080 . 'date(attr,'path')' returns the date attribute for the given
1081 'path' (file or directory),
1082 with 'attr' being { 0=year | 1=month | 2=day | 3=day of week
1083 | 4=hour | 5=minute |
1084 6=second }, or a vector of those values.
1085 . 'date(_attr)' returns the specified attribute for the current
1086 (locale) date.
1087 . 'print(expr1,expr2,...)' or 'print(#ind)' prints the value of
1088 the specified expressions
1089 (or image information) on the console, and returns the value
1090 of the last expression
1091 (or nan in case of an image). Function 'prints(expr)' also
1092 prints the string composed
1093 of the ascii characters defined by the vector-valued expres‐
1094 sion (e.g. 'prints('Hello')').
1095 . 'debug(expression)' prints detailed debug information about
1096 the sequence of operations done
1097 by the math parser to evaluate the expression (and returns
1098 its value).
1099 . 'display(_X,_w,_h,_d,_s)' or 'display(#ind)' display the con‐
1100 tents of the vector 'X'
1101 (or specified image) and wait for user events. if no argu‐
1102 ments are provided, a memory
1103 snapshot of the math parser environment is displayed instead.
1104 . 'begin(expression)' and 'end(expression)' evaluates the speci‐
1105 fied expressions only once,
1106 respectively at the beginning and end of the evaluation pro‐
1107 cedure, and this,
1108 even when multiple evaluations are required (e.g. in 'fill
1109 ">begin(foo = 0); ++foo"').
1110 . 'copy(dest,src,_nb_elts,_inc_d,_inc_s,_opacity)' copies an
1111 entire memory block of 'nb_elts'
1112 elements starting from a source value 'src' to a specified
1113 destination 'dest', with
1114 increments defined by 'inc_d' and 'inc_s' respectively for
1115 the destination and source
1116 pointers.
1117 . 'stats(_#ind)' returns the statistics vector of the running
1118 image '[ind]', i.e the vector
1119 [ im,iM,ia,iv,xm,ym,zm,cm,xM,yM,zM,cM,is,ip ] (14 values).
1120 . 'unref(a,b,...)' destroys references to the named variable
1121 given as arguments.
1122 . 'breakpoint()' inserts a possible computation breakpoint (not
1123 supported by the cli interface).
1124 . '_(expr)' just ignores its arguments (mainly useful for debug‐
1125 ging).
1126 . 'ext('pipeline')' executes the specified G'MIC pipeline as if
1127 it was called outside
1128 the currently evaluated expression.
1129 . 'correlate(I,wI,hI,dI,sI,K,wK,hK,dK,sK,_boundary_condi‐
1130 tions,_is_normalized,_channel_mode,
1131 _xcenter,_ycenter,_zcen‐
1132 ter,_xstart,_ystart,_zstart,_xend,_yend,_zend,
1133 _xstride,_ystride,_zstride,_xdilation,_ydila‐
1134 tion,_zdilation)'
1135 returns the correlation, unrolled as a vector, of the wI x
1136 hI x dI x sI-sized image I with
1137 the wK x hK x dK x sK-sized kernel K (the meaning of the
1138 other arguments are the same as in
1139 command 'correlate'). Similar function 'convolve(...)' is
1140 also defined for computing
1141 the convolution between I and K.
1142
1143 - User-defined macros:
1144
1145 . Custom macro functions can be defined in a math expression,
1146 using the assignment operator
1147 '=', e.g. 'foo(x,y) = cos(x + y); result = foo(1,2) +
1148 foo(2,3)'.
1149 . Trying to override a built-in function (e.g. 'abs()') has no
1150 effect.
1151 . Overloading macros with different number of arguments is pos‐
1152 sible. Re-defining a
1153 previously defined macro with the same number of arguments
1154 discards its previous
1155 definition.
1156 . Macro functions are indeed processed as macros by the mathe‐
1157 matical evaluator. You should
1158 avoid invoking them with arguments that are themselves
1159 results of assignments or
1160 self-operations. For instance, 'foo(x) = x + x; z = 0;
1161 foo(++z)' returns '4' rather
1162 than expected value '2'.
1163 . When substituted, macro arguments are placed inside parenthe‐
1164 ses, except if a number sign
1165 '#' is located just before or after the argument name. For
1166 instance, expression
1167 'foo(x,y) = x*y; foo(1+2,3)' returns '9' (being substituted
1168 as '(1+2)*(3)'), while
1169 expression 'foo(x,y) = x#*y#; foo(1+2,3)' returns '7' (being
1170 substituted as '1+2*3').
1171 . Number signs appearing between macro arguments function actu‐
1172 ally count for 'empty'
1173 separators. They may be used to force the substitution of
1174 macro arguments in unusual
1175 places, e.g. as in 'str(N) = ['I like N#'];'.
1176
1177 - Multi-threaded and in-place evaluation:
1178
1179 . If your image data are large enough and you have several CPUs
1180 available, it is likely that
1181 the math expression passed to a 'fill' or 'input' command is
1182 evaluated in parallel,
1183 using multiple computation threads.
1184 . Starting an expression with ':' or '*' forces the evaluations
1185 required for an image to be
1186 run in parallel, even if the amount of data to process is
1187 small (beware, it may be slower
1188 to evaluate in this case!). Specify ':' (instead of '*') to
1189 avoid possible image copy
1190 done before evaluating the expression (this saves memory, but
1191 do this only if you are
1192 sure this step is not required!)
1193 . If the specified expression starts with '>' or '<', the pixel
1194 access operators
1195 'i(), i[], j()' and 'j[]' return values of the image being
1196 currently modified,
1197 in forward ('>') or backward ('<') order. The multi-threading
1198 evaluation of the
1199 expression is also disabled in this case.
1200 . Function 'critical(operands)' forces the execution of the
1201 given operands in a single thread at a
1202 time.
1203
1204 _ Expressions 'i(_#ind,x,_y,_z,_c)=value',
1205 'j(_#ind,x,_y,_z,_c)=value', 'i[_#ind,offset]=value'
1206 and 'j[_#ind,offset]=value' set a pixel value at a different
1207 location than the running one
1208 in the image [ind] (or in the associated image if argument
1209 '#ind' is omitted), either with
1210 global coordinates/offsets (with 'i(...)' and 'i[...]'), or rel‐
1211 atively to the current
1212 position (x,y,z,c) (with 'j(...)' and 'j[...]'). These expres‐
1213 sions always return 'value'.
1214
1215 - The last image of the list is always associated to the evaluations
1216 of '{expressions}',
1217 e.g. G'MIC sequence '256,128 fill {w}' will create a 256x128 image
1218 filled with value 256.
1219
1220 10. Image and data viewers
1221
1222 - G'MIC has some very handy embedded visualization modules, for 1D
1223 signals (command 'plot'),
1224 1D/2D/3D images (command 'display') and 3D objects (command 'dis‐
1225 play3d'). It manages
1226 interactive views of the selected image data.
1227
1228 - The following actions are available in the interactive viewers:
1229
1230 . (mousewheel): Zoom in/out.
1231 . ESC: Close window.
1232 . CTRL+D: Increase window size.
1233 . CTRL+C: Decrease window size.
1234 . CTRL+R: Reset window size.
1235 . CTRL+F: Toggle fullscreen mode.
1236 . CTRL+S: Save current view as a numbered file 'gmic_xxxx.ext'.
1237 . CTRL+O: Save copy of the viewed data, as a numbered file
1238 'gmic_xxxx.ext'.
1239
1240 - Actions specific to the 1D/2D image viewer (command 'display') are:
1241
1242 . Left mouse button: Create an image selection and zoom into it.
1243 . Middle mouse button, or CTRL+left mouse button: Move image.
1244 . Mouse wheel or PADD+/-: Zoom in/out.
1245 . Arrow keys: Move image left/right/up/down.
1246 . CTRL+A: Enable/disable transparency (show alpha channel).
1247 . CTRL+N: Change normalization mode (can be 'none', 'normal' or
1248 'channel-by-channel').
1249 . CTRL+SPACE: Reset view.
1250 . CTRL+X: Show/hide axes.
1251 . CTRL+Z: Hold/release aspect ratio.
1252
1253 - Actions specific to the 3D volumetric image viewer (command 'dis‐
1254 play') are:
1255
1256 . CTRL+P: Play z-stack of frames as a movie.
1257 . CTRL+V: Show/hide 3D view on bottom right zone.
1258 . CTRL+X: Show/hide axes.
1259 . CTRL+(mousewheel): Go up/down.
1260 . SHIFT+(mousewheel): Go left/right.
1261 . Numeric PAD: Zoom in/out (+/-) and move through zoomed image
1262 (digits).
1263 . BACKSPACE: Reset zoom scale.
1264
1265 - Actions specific to the 3D object viewer (command 'display3d') are:
1266
1267 . (mouse)+(left mouse button): Rotate 3D object.
1268 . (mouse)+(right mouse button): Zoom 3D object.
1269 . (mouse)+(middle mouse button): Shift 3D object.
1270 . CTRL+F1 ... CTRL+F6: Toggle between different 3D rendering modes.
1271 . CTRL+G: Save 3D object, as numbered file 'gmic_xxxx.off'.
1272 . CTRL+T: Switch between single/double-sided 3D modes.
1273 . CTRL+X: Show/hide 3D axes.
1274 . CTRL+Z: Enable/disable z-buffered rendering.
1275
1276 11. Adding custom commands
1277
1278 - New custom commands can be added by the user, through the use of
1279 G'MIC custom commands files.
1280
1281 - A command file is a simple ascii text file, where each line starts
1282 either by
1283 'command_name: command_definition' or 'command_definition (contin‐
1284 uation)'.
1285
1286 - At startup, G'MIC automatically includes user's command file
1287 $HOME/.gmic (on Unix) or
1288 %APPDATA%/user.gmic (on Windows). The CLI tool 'gmic' automati‐
1289 cally runs the command
1290 'cli_start' if defined.
1291
1292 - Custom command names must use character set [a-zA-Z0-9_] and cannot
1293 start with a number.
1294
1295 - Any ' # comment' expression found in a custom commands file is dis‐
1296 carded by the G'MIC parser,
1297 wherever it is located in a line.
1298
1299 - In a custom command, the following $-expressions are recognized and
1300 substituted:
1301
1302 . '$*' is substituted by a copy of the specified string of argu‐
1303 ments.
1304 . '$"*"' is substituted by a copy of the specified string of argu‐
1305 ments, each being
1306 double-quoted.
1307 . '$#' is substituted by the maximum index of known arguments
1308 (either specified by the user
1309 or set to a default value in the custom command).
1310 . '$[]' is substituted by the list of selected image indices that
1311 have been specified during the
1312 command invocation.
1313 . '$?' is substituted by a printable version of '$[]' to be used in
1314 command descriptions.
1315 . '$i' and '${i}' are both substituted by the i^th specified argu‐
1316 ment. Negative indices such as
1317 '${-j}' are allowed and refer to the j^th latest argument. '$0'
1318 is substituted
1319 by the custom command name.
1320 . '${i=default}' is substituted by the value of $i (if defined) or
1321 by its new value set to
1322 'default' otherwise ('default' may be a $-expression as well).
1323 . '${subset}' is substituted by the argument values (separated by
1324 commas ',') of a specified
1325 argument subset. For instance expression '${2--2}' is substitued
1326 by all specified command
1327 arguments except the first and the last one. Expression '${^0}'
1328 is then substituted by all
1329 arguments of the invoked command (eq. to '$*' if all specified
1330 arguments have indeed a
1331 value).
1332 . '$=var' is substituted by the set of instructions that will
1333 assign each argument $i to the
1334 named variable 'var$i' (for i in [0...$#]). This is particularly
1335 useful when a custom
1336 command want to manage variable numbers of arguments. Variables
1337 names must use character set
1338 [a-zA-Z0-9_] and cannot start with a number.
1339
1340 - These particular $-expressions for custom commands are always sub‐
1341 stituted, even in
1342 double-quoted items or when the dollar sign '$' is escaped with a
1343 backslash '\'. To avoid
1344 substitution, place an empty double quoted string just after the
1345 '$' (as in '$""1').
1346
1347 - Specifying arguments may be skipped when invoking a custom command,
1348 by replacing them by commas
1349 ',' as in expression 'flower ,,3'. Omitted arguments are set to
1350 their default values, which
1351 must be thus explicitly defined in the code of the corresponding
1352 custom command (using
1353 default argument expressions as '${1=default}').
1354
1355 - If one numbered argument required by a custom command misses a
1356 value, an error is thrown by the
1357 G'MIC interpreter.
1358
1359 12. List of commands
1360
1361 All available G'MIC commands are listed below, classified by themes.
1362 When several choices of
1363 command arguments are possible, they appear separated by '|'. An
1364 argument specified inside '[]'
1365 or starting by '_' is optional except when standing for an existing
1366 image [image], where 'image'
1367 can be either an index number or an image name. In this case, the
1368 '[]' characters are mandatory
1369 when writing the item. A command marked with '(+)' is one of the
1370 builtin commands. Note also
1371 that all images that serve as illustrations in this reference docu‐
1372 mentation are normalized in [0,255]
1373 before being displayed. You may need to do this explicitly (command
1374 'normalize 0,255') if you
1375 want to save and view images with the same aspect than those illus‐
1376 trated in the example codes.
1377
1378 ** Global Options:
1379
1380 debug (+):
1381
1382 Activate debug mode.
1383 When activated, the G'MIC interpreter becomes very verbose and
1384 outputs additional log
1385 messages about its internal state on the standard output (std‐
1386 out).
1387 This option is useful for developers or to report possible bugs
1388 of the interpreter.
1389
1390 help:
1391 command |
1392 (no arg)
1393
1394 Display help (optionally for specified command only) and exit.
1395 (eq. to 'h').
1396
1397 version:
1398
1399 Display current version number on stdout.
1400
1401 ** Input / Output:
1402
1403 camera (+):
1404 _camera_index>=0,_nb_frames>0,_skip_frames>=0,_cap‐
1405 ture_width>=0,
1406 _capture_height>=0
1407
1408 Insert one or several frames from specified camera.
1409 When 'nb_frames==0', the camera stream is released instead of
1410 capturing new images.
1411
1412 Default values: 'camera_index=0' (default camera),
1413 'nb_frames=1', 'skip_frames=0' and
1414 'capture_width=capture_height=0' (default size).
1415
1416 clut:
1417 "clut_name",_resolution>0,_cut_and_round={ 0=no | 1=yes }
1418
1419 Insert one of the 763 pre-defined CLUTs at the end of the image
1420 list.
1421 'clut_name' can be { 2-strip-process | 60s | 60s_faded |
1422 60s_faded_alt | action_magenta_01 |
1423 action_red_01 | adventure_1453 | agfa_apx_100 | agfa_apx_25 |
1424 agfa_precisa_100 |
1425 agfa_ultra_color_100 | agfa_vista_200 | agressive_high‐
1426 ligjtes_recovery_5 | alien_green |
1427 analogfx_anno_1870_color | analogfx_old_style_i |
1428 analogfx_old_style_ii |
1429 analogfx_old_style_iii | analogfx_sepia_color |
1430 analogfx_soft_sepia_i | analogfx_soft_sepia_ii |
1431 anime | apocalypse_this_very_moment | aqua |
1432 aqua_and_orange_dark | arabica_12 | ava_614 |
1433 avalanche | azrael_93 | bboyz_2 | berlin_sky |
1434 black_and_white | black_star | blade_runner |
1435 bleach_bypass | bleachbypass_1 | bleachbypass_2 | bleachby‐
1436 pass_3 | bleachbypass_4 |
1437 bleech_bypass_green | bleech_bypass_yellow_01 | blue_dark |
1438 blue_house | blue_ice | blue_mono |
1439 blue_shadows_01 | blues | bob_ford | bourbon_64 |
1440 bright_green_01 | brightgreen | brownish |
1441 bw_1 | bw_10 | bw_2 | bw_3 | bw_4 | bw_5 | bw_6 | bw_7 | bw_8
1442 | bw_9 | byers_11 | candlelight |
1443 caribe | chemical_168 | chrome_01 | cinema | cinema_2 | cin‐
1444 ema_3 | cinema_4 | cinema_5 |
1445 cinema_noir | cinematic-1 | cinematic-10 | cinematic-2 | cin‐
1446 ematic-3 | cinematic-4 |
1447 cinematic-5 | cinematic-6 | cinematic-7 | cinematic-8 | cine‐
1448 matic-9 | cinematic_01 |
1449 cinematic_02 | cinematic_03 | cinematic_for_flog | city_7 |
1450 classic_teal_and_orange |
1451 clayton_33 | clouseau_54 | cobi_3 | coffee_44 | cold_simplic‐
1452 ity_2 | color_rich | colorful_0209 |
1453 colornegative | conflict_01 | contrail_35 | con‐
1454 trast_with_highlights_protection |
1455 contrasty_afternoon | contrasty_green | crispromance | crisp‐
1456 warm | crispwinter |
1457 cross_process_cp_130 | cross_process_cp_14 |
1458 cross_process_cp_15 | cross_process_cp_16 |
1459 cross_process_cp_18 | cross_process_cp_3 | cross_process_cp_4
1460 | cross_process_cp_6 | crushin |
1461 cubicle_99 | d_o_1 | dark_green_02 | dark_green_1 |
1462 dark_place_01 | date_39 | day_4nite |
1463 day_for_night | denoiser_simple_40 | desert_gold_37 | direc‐
1464 tions_23 | django_25 | domingo_145 |
1465 dream_1 | dream_85 | drop_green_tint_14 | dropblues |
1466 earth_tone_boost | edgyember |
1467 elegance_38 | eterna_for_flog | expired_fade |
1468 expired_polaroid | extreme | fade |
1469 fade_to_green | faded | faded_47 | faded_alt | faded_analog |
1470 faded_extreme | faded_retro_01 |
1471 faded_retro_02 | faded_vivid | fallcolors | faux_infrared |
1472 fgcinebasic | fgcinebright |
1473 fgcinecold | fgcinedrama | fgcinetealorange_1 | fgcinetealor‐
1474 ange_2 | fgcinevibrant | fgcinewarm
1475 | film_0987 | film_9879 | film_high_contrast | film_print_01
1476 | film_print_02 | filmic | flat_30
1477 | foggynight | folger_50 | french_comedy | frostedbeachpicnic
1478 | fuji_160c | fuji_160c_+ |
1479 fuji_160c_++ | fuji_160c_- | fuji_3510_constlclip |
1480 fuji_3510_constlmap | fuji_3510_cuspclip |
1481 fuji_3513_constlclip | fuji_3513_constlmap | fuji_3513_cusp‐
1482 clip | fuji_400h | fuji_400h_+ |
1483 fuji_400h_++ | fuji_400h_- | fuji_800z | fuji_800z_+ |
1484 fuji_800z_++ | fuji_800z_- |
1485 fuji_astia_100_generic | fuji_astia_100f | fuji_fp-100c |
1486 fuji_fp-100c_+ | fuji_fp-100c_++ |
1487 fuji_fp-100c_+++ | fuji_fp-100c_++_alt | fuji_fp-100c_- |
1488 fuji_fp-100c_-- | fuji_fp-100c_alt |
1489 fuji_fp-100c_cool | fuji_fp-100c_cool_+ |
1490 fuji_fp-100c_cool_++ | fuji_fp-100c_cool_- |
1491 fuji_fp-100c_cool_-- | fuji_fp-100c_negative |
1492 fuji_fp-100c_negative_+ | fuji_fp-100c_negative_+
1493 + | fuji_fp-100c_negative_+++ | fuji_fp-100c_negative_++_alt
1494 | fuji_fp-100c_negative_- |
1495 fuji_fp-100c_negative_-- | fuji_fp-3000b | fuji_fp-3000b_+ |
1496 fuji_fp-3000b_++ | fuji_fp-3000b_++
1497 + | fuji_fp-3000b_- | fuji_fp-3000b_-- | fuji_fp-3000b_hc |
1498 fuji_fp-3000b_negative |
1499 fuji_fp-3000b_negative_+ | fuji_fp-3000b_negative_++ |
1500 fuji_fp-3000b_negative_+++ |
1501 fuji_fp-3000b_negative_- | fuji_fp-3000b_negative_-- |
1502 fuji_fp-3000b_negative_early |
1503 fuji_fp_100c | fuji_hdr | fuji_neopan_1600 |
1504 fuji_neopan_1600_+ | fuji_neopan_1600_++ |
1505 fuji_neopan_1600_- | fuji_neopan_acros_100 |
1506 fuji_provia_100_generic | fuji_provia_100f |
1507 fuji_provia_400f | fuji_provia_400x | fuji_sensia_100 |
1508 fuji_superia_100 | fuji_superia_100_+ |
1509 fuji_superia_100_++ | fuji_superia_100_- | fuji_superia_1600
1510 | fuji_superia_1600_+ |
1511 fuji_superia_1600_++ | fuji_superia_1600_- | fuji_superia_200
1512 | fuji_superia_200_xpro |
1513 fuji_superia_400 | fuji_superia_400_+ | fuji_superia_400_++ |
1514 fuji_superia_400_- |
1515 fuji_superia_800 | fuji_superia_800_+ | fuji_superia_800_++ |
1516 fuji_superia_800_- |
1517 fuji_superia_hg_1600 | fuji_superia_reala_100 | fuji_supe‐
1518 ria_x-tra_800 |
1519 fuji_velvia_100_generic | fuji_velvia_50 |
1520 fuji_xtrans_iii_acros | fuji_xtrans_iii_acros+g |
1521 fuji_xtrans_iii_acros+r | fuji_xtrans_iii_acros+ye |
1522 fuji_xtrans_iii_astia |
1523 fuji_xtrans_iii_classic_chrome | fuji_xtrans_iii_mono |
1524 fuji_xtrans_iii_mono+g |
1525 fuji_xtrans_iii_mono+r | fuji_xtrans_iii_mono+ye |
1526 fuji_xtrans_iii_pro_neg_hi |
1527 fuji_xtrans_iii_pro_neg_std | fuji_xtrans_iii_provia |
1528 fuji_xtrans_iii_sepia |
1529 fuji_xtrans_iii_velvia | fusion_88 | futuristicbleak_1 |
1530 futuristicbleak_2 | futuristicbleak_3 |
1531 futuristicbleak_4 | golden | golden_bright | golden_fade |
1532 golden_mono |
1533 golden_night_softner_43 | golden_sony_37 | golden_vibrant |
1534 goldengate |
1535 goldfx_bright_spring_breeze | goldfx_bright_summer_heat |
1536 goldfx_hot_summer_heat |
1537 goldfx_perfect_sunset_01min | goldfx_perfect_sunset_05min |
1538 goldfx_perfect_sunset_10min |
1539 goldfx_spring_breeze | goldfx_summer_heat | green_15 |
1540 green_2025 | green_action |
1541 green_afternoon | green_blues | green_conflict | green_day_01
1542 | green_day_02 | green_g_09 |
1543 green_indoor | green_light | green_mono | green_yellow |
1544 hackmanite | happyness_133 | harsh_day
1545 | harsh_sunset | helios | herderite | heulandite | hiddenite
1546 | highlights_protection | hilutite
1547 | hlg_1_1 | hong_kong | horrorblue | howlite | hydracore |
1548 hyla_68 | hypersthene | hypnosis |
1549 ilford_delta_100 | ilford_delta_3200 | ilford_delta_3200_+ |
1550 ilford_delta_3200_++ |
1551 ilford_delta_3200_- | ilford_delta_400 | ilford_fp_4_plus_125
1552 | ilford_hp_5 | ilford_hp_5_+ |
1553 ilford_hp_5_++ | ilford_hp_5_- | ilford_hp_5_plus_400 |
1554 ilford_hps_800 | ilford_pan_f_plus_50 |
1555 ilford_xp_2 | indoor_blue | industrial_33 | instantc | just‐
1556 peachy | k_tone_vintage_kodachrome |
1557 killstreak | kodak_2383_constlclip | kodak_2383_constlmap |
1558 kodak_2383_cuspclip |
1559 kodak_2393_constlclip | kodak_2393_constlmap |
1560 kodak_2393_cuspclip | kodak_bw_400_cn |
1561 kodak_e-100_gx_ektachrome_100 | kodak_ektachrome_100_vs |
1562 kodak_ektachrome_100_vs_generic |
1563 kodak_ektar_100 | kodak_elite_100_xpro |
1564 kodak_elite_chrome_200 | kodak_elite_chrome_400 |
1565 kodak_elite_color_200 | kodak_elite_color_400 |
1566 kodak_elite_extracolor_100 | kodak_hie_hs_infra
1567 | kodak_kodachrome_200 | kodak_kodachrome_25 |
1568 kodak_kodachrome_64 |
1569 kodak_kodachrome_64_generic | kodak_portra_160 | kodak_por‐
1570 tra_160_+ | kodak_portra_160_++ |
1571 kodak_portra_160_- | kodak_portra_160_nc | kodak_por‐
1572 tra_160_nc_+ | kodak_portra_160_nc_++ |
1573 kodak_portra_160_nc_- | kodak_portra_160_vc | kodak_por‐
1574 tra_160_vc_+ | kodak_portra_160_vc_++ |
1575 kodak_portra_160_vc_- | kodak_portra_400 | kodak_portra_400_+
1576 | kodak_portra_400_++ |
1577 kodak_portra_400_- | kodak_portra_400_nc | kodak_por‐
1578 tra_400_nc_+ | kodak_portra_400_nc_++ |
1579 kodak_portra_400_nc_- | kodak_portra_400_uc | kodak_por‐
1580 tra_400_uc_+ | kodak_portra_400_uc_++ |
1581 kodak_portra_400_uc_- | kodak_portra_400_vc | kodak_por‐
1582 tra_400_vc_+ | kodak_portra_400_vc_++ |
1583 kodak_portra_400_vc_- | kodak_portra_800 | kodak_portra_800_+
1584 | kodak_portra_800_++ |
1585 kodak_portra_800_- | kodak_portra_800_hc | kodak_t-max_100 |
1586 kodak_t-max_3200 | kodak_t-max_400
1587 | kodak_tmax_3200 | kodak_tmax_3200_+ | kodak_tmax_3200_++ |
1588 kodak_tmax_3200_- |
1589 kodak_tmax_3200_alt | kodak_tri-x_400 | kodak_tri-x_400_+ |
1590 kodak_tri-x_400_++ |
1591 kodak_tri-x_400_- | kodak_tri-x_400_alt | korben_214 | land‐
1592 scape_1 | landscape_10 | landscape_2
1593 | landscape_3 | landscape_4 | landscape_5 | landscape_6 |
1594 landscape_7 | landscape_8 |
1595 landscape_9 | lateafternoonwanderlust | latesunset | lc_1 |
1596 lc_10 | lc_2 | lc_3 | lc_4 | lc_5 |
1597 lc_6 | lc_7 | lc_8 | lc_9 | lenox_340 | life_giving_tree |
1598 light_blown | lomo |
1599 lomography_redscale_100 | lomography_x-pro_slide_200 |
1600 low_contrast_blue | low_key_01 |
1601 lucky_64 | lushgreensummer | magenta_day | magenta_day_01 |
1602 magenta_dream | magentacoffee |
1603 matrix | mckinnon_75 | memories | milo_5 | minimalistcaf‐
1604 feination | mono_tinted | monochrome_1 |
1605 monochrome_2 | moody_1 | moody_10 | moody_2 | moody_3 |
1606 moody_4 | moody_5 | moody_6 | moody_7 |
1607 moody_8 | moody_9 | moonlight | moonlight_01 | moonrise |
1608 morning_6 | morroco_16 | mostly_blue
1609 | moviz_1 | moviz_10 | moviz_11 | moviz_12 | moviz_13 |
1610 moviz_14 | moviz_15 | moviz_16 |
1611 moviz_17 | moviz_18 | moviz_19 | moviz_2 | moviz_20 |
1612 moviz_21 | moviz_22 | moviz_23 | moviz_24
1613 | moviz_25 | moviz_26 | moviz_27 | moviz_28 | moviz_29 |
1614 moviz_3 | moviz_30 | moviz_31 |
1615 moviz_32 | moviz_33 | moviz_34 | moviz_35 | moviz_36 |
1616 moviz_37 | moviz_38 | moviz_39 | moviz_4
1617 | moviz_40 | moviz_41 | moviz_42 | moviz_43 | moviz_44 |
1618 moviz_45 | moviz_46 | moviz_47 |
1619 moviz_48 | moviz_5 | moviz_6 | moviz_7 | moviz_8 | moviz_9 |
1620 mute_shift | muted_01 | muted_fade
1621 | mysticpurplesunset | natural_vivid | nemesis | neon_770 |
1622 night_01 | night_blade_4 |
1623 night_king_141 | nightfromday | nostalgiahoney | nostalgic |
1624 nw-1 | nw-10 | nw-2 | nw-3 | nw-4 |
1625 nw-5 | nw-6 | nw-7 | nw-8 | nw-9 | old_west | only_red |
1626 only_red_and_blue | operation_yellow |
1627 orange_dark_4 | orange_dark_7 | orange_dark_look |
1628 orange_tone | orange_underexposed | oranges
1629 | paladin | paladin_1875 | pasadena_21 | pink_fade |
1630 pitaya_15 | polaroid_664 | polaroid_665 |
1631 polaroid_665_+ | polaroid_665_++ | polaroid_665_- |
1632 polaroid_665_-- | polaroid_665_negative |
1633 polaroid_665_negative_+ | polaroid_665_negative_- |
1634 polaroid_665_negative_hc | polaroid_667 |
1635 polaroid_669 | polaroid_669_+ | polaroid_669_++ |
1636 polaroid_669_+++ | polaroid_669_- |
1637 polaroid_669_-- | polaroid_669_cold | polaroid_669_cold_+ |
1638 polaroid_669_cold_- |
1639 polaroid_669_cold_-- | polaroid_672 | polaroid_690 |
1640 polaroid_690_+ | polaroid_690_++ |
1641 polaroid_690_- | polaroid_690_-- | polaroid_690_cold |
1642 polaroid_690_cold_+ | polaroid_690_cold_+
1643 + | polaroid_690_cold_- | polaroid_690_cold_-- |
1644 polaroid_690_warm | polaroid_690_warm_+ |
1645 polaroid_690_warm_++ | polaroid_690_warm_- |
1646 polaroid_690_warm_-- | polaroid_polachrome |
1647 polaroid_px-100uv+_cold | polaroid_px-100uv+_cold_+ |
1648 polaroid_px-100uv+_cold_++ |
1649 polaroid_px-100uv+_cold_+++ | polaroid_px-100uv+_cold_- |
1650 polaroid_px-100uv+_cold_-- |
1651 polaroid_px-100uv+_warm | polaroid_px-100uv+_warm_+ |
1652 polaroid_px-100uv+_warm_++ |
1653 polaroid_px-100uv+_warm_+++ | polaroid_px-100uv+_warm_- |
1654 polaroid_px-100uv+_warm_-- |
1655 polaroid_px-680 | polaroid_px-680_+ | polaroid_px-680_++ |
1656 polaroid_px-680_- |
1657 polaroid_px-680_-- | polaroid_px-680_cold |
1658 polaroid_px-680_cold_+ | polaroid_px-680_cold_++ |
1659 polaroid_px-680_cold_++_alt | polaroid_px-680_cold_- |
1660 polaroid_px-680_cold_-- |
1661 polaroid_px-680_warm | polaroid_px-680_warm_+ |
1662 polaroid_px-680_warm_++ |
1663 polaroid_px-680_warm_- | polaroid_px-680_warm_-- |
1664 polaroid_px-70 | polaroid_px-70_+ |
1665 polaroid_px-70_++ | polaroid_px-70_+++ | polaroid_px-70_- |
1666 polaroid_px-70_-- |
1667 polaroid_px-70_cold | polaroid_px-70_cold_+ |
1668 polaroid_px-70_cold_++ | polaroid_px-70_cold_- |
1669 polaroid_px-70_cold_-- | polaroid_px-70_warm |
1670 polaroid_px-70_warm_+ | polaroid_px-70_warm_++ |
1671 polaroid_px-70_warm_- | polaroid_px-70_warm_-- |
1672 polaroid_time_zero_expired |
1673 polaroid_time_zero_expired_+ | polaroid_time_zero_expired_++
1674 | polaroid_time_zero_expired_- |
1675 polaroid_time_zero_expired_-- |
1676 polaroid_time_zero_expired_--- |
1677 polaroid_time_zero_expired_cold |
1678 polaroid_time_zero_expired_cold_- |
1679 polaroid_time_zero_expired_cold_-- |
1680 polaroid_time_zero_expired_cold_--- | portrait_1 |
1681 portrait_10 | portrait_2 | portrait_3 | portrait_4 | por‐
1682 trait_5 | portrait_6 | portrait_7 |
1683 portrait_8 | portrait_9 | protect_highlights_01 | purple |
1684 purple_2 | red_afternoon_01 |
1685 red_day_01 | red_dream_01 | redblueyellow | reds |
1686 reds_oranges_yellows | reeve_38 | remy_24 |
1687 rest_33 | retro | retro_brown_01 | retro_magenta_01 |
1688 retro_summer_3 | retro_yellow_01 |
1689 rollei_ir_400 | rollei_ortho_25 | rollei_retro_100_tonal |
1690 rollei_retro_80s | rotate_muted |
1691 rotate_vibrant | rotated | rotated_crush | saturated_blue |
1692 saving_private_damon |
1693 science_fiction | seringe_4 | serpent | shadow_king_39 |
1694 smart_contrast | smokey |
1695 smooth_cromeish | smooth_fade | soft_fade | softwarming |
1696 solarized_color | solarized_color_2 |
1697 springmorning | sprocket_231 | spy_29 | stu‐
1698 dio_skin_tone_shaper | subtle_blue | subtle_green |
1699 subtle_yellow | summer | summer_alt | sunny | sunny_alt |
1700 sunny_rich | sunny_warm | super_warm |
1701 super_warm_rich | sutro_fx | teal_moonlight | tealmagen‐
1702 tagold | tealorange | tealorange_1 |
1703 tealorange_2 | tealorange_3 | technicalfx_backlight_filter |
1704 teigen_28 | tensiongreen_1 |
1705 tensiongreen_2 | tensiongreen_3 | tensiongreen_4 | terra_4 |
1706 the_matrices | thriller_2 |
1707 toastedgarden | trent_18 | true_colors_8 | turkiest_42 |
1708 tweed_71 | vibrant | vibrant_alien |
1709 vibrant_contrast | vibrant_cromeish | victory | vintage |
1710 vintage_163 | vintage_alt |
1711 vintage_brighter | vintage_chrome | vintage_warmth_1 |
1712 vireo_37 | warm | warm_highlight |
1713 warm_yellow | winterlighthouse | wooden_gold_20 | yellow_55b
1714 | yellow_film_01 | yellowstone |
1715 zed_32 | zeke_39 | zilverfx_bw_solarization | zil‐
1716 verfx_infrared | zilverfx_vintage_bw }
1717
1718 Default values: 'resolution=48' and 'cut_and_round=1'.
1719
1720 command (+):
1721 _add_debug_info={ 0 | 1 },{ filename | http[s]://URL | "string"
1722 }
1723
1724 Import G'MIC custom commands from specified file, URL or
1725 string.
1726 (eq. to 'm').
1727 Imported commands are available directly after the 'command'
1728 invocation.
1729
1730 Default value: 'add_debug_info=1'.
1731
1732 cursor (+):
1733 _mode = { 0=hide | 1=show }
1734
1735 Show or hide mouse cursor for selected instant display windows.
1736 Command selection (if any) stands for instant display window
1737 indices instead of image indices.
1738
1739 Default value: 'mode=1'.
1740
1741 display (+):
1742 _X[%]>=0,_Y[%]>=0,_Z[%]>=0,_exit_on_anykey={ 0 | 1 }
1743
1744 Display selected images in an interactive viewer (use the
1745 instant display window [0] if opened).
1746 (eq. to 'd').
1747 Arguments 'X','Y','Z' determine the initial selection view, for
1748 3D volumetric images.
1749
1750 Default value: 'X=Y=Z=0' and 'exit_on_anykey=0'.
1751
1752 display0:
1753
1754 Display selected images without value normalization.
1755 (eq. to 'd0').
1756
1757 display2d:
1758
1759 Display selected 2d images in an interactive window.
1760 (eq. to 'd2d').
1761 This command is used by default by command 'display' when dis‐
1762 playing 2d images.
1763 When interactive window is opened, the following actions are
1764 possible:
1765 - Left mouse button: Create an image selection and zoom into
1766 it.
1767 - Middle mouse button, or CTRL+left mouse button: Move image.
1768 - Mouse wheel or PADD+/-: Zoom in/out.
1769 - Arrow keys: Move image left/right/up/down.
1770 - CTRL + A: Enable/disable transparency (show/hide alpha chan‐
1771 nel).
1772 - CTRL + C: Decrease window size.
1773 - CTRL + D: Increase window size.
1774 - CTRL + F: Toggle fullscreen mode.
1775 - CTRL + N: Change normalization mode (can be 'none' | 'normal'
1776 | 'channel-by-channel').
1777 - CTRL + O: Save a copy of the input image, as a numbered file
1778 'gmic_xxxxxx.gmz'.
1779 - CTRL + R: Reset both window size and view.
1780 - CTRL + S: Save a screenshot of the current view, as a num‐
1781 bered file 'gmic_xxxxxx.png'.
1782 - CTRL + SPACE: Reset view.
1783 - CTRL + X: Show/hide axes.
1784 - CTRL + Z: Hold/release aspect ratio.
1785
1786 display3d (+):
1787 _[background_image],_exit_on_anykey={ 0 | 1 } |
1788 _exit_on_anykey={ 0 | 1 }
1789
1790 Display selected 3D objects in an interactive viewer (use the
1791 instant display window [0] if opened).
1792 (eq. to 'd3d').
1793
1794 Default values: '[background_image]=(default)' and
1795 'exit_on_anykey=0'.
1796
1797 display_array:
1798 _width>0,_height>0
1799
1800 Display images in interactive windows where pixel neighborhoods
1801 can be explored.
1802
1803 Default values: 'width=13' and 'height=width'.
1804
1805 display_fft:
1806
1807 Display fourier transform of selected images, with centered
1808 log-module and argument.
1809 (eq. to 'dfft').
1810
1811 display_graph:
1812 _width>=0,_height>=0,_plot_type,_ver‐
1813 tex_type,_xmin,_xmax,_ymin,_ymax,_xlabel,_ylabel
1814
1815 Render graph plot from selected image data.
1816 'plot_type' can be { 0=none | 1=lines | 2=splines | 3=bar }.
1817 'vertex_type' can be { 0=none | 1=points | 2,3=crosses |
1818 4,5=circles | 6,7=squares }.
1819 'xmin','xmax','ymin','ymax' set the coordinates of the dis‐
1820 played xy-axes.
1821 if specified 'width' or 'height' is '0', then image size is set
1822 to half the screen size.
1823
1824 Default values: 'width=0', 'height=0', 'plot_type=1', 'ver‐
1825 tex_type=1', 'xmin=xmax=ymin=ymax=0
1826 (auto)', 'xlabel="x-axis"' and 'ylabel="y-axis"'.
1827
1828 display_histogram:
1829 _width>=0,_height>=0,_clus‐
1830 ters>0,_min_value[%],_max_value[%],_show_axes={ 0 | 1
1831 },_expression.
1832
1833 Render a channel-by-channel histogram.
1834 If selected images have several slices, the rendering is per‐
1835 formed for all input slices.
1836 'expression' is a mathematical expression used to transform the
1837 histogram data for
1838 visualization purpose.
1839 (eq. to 'dh').
1840 if specified 'width' or 'height' is '0', then image size is set
1841 to half the screen size.
1842
1843 Default values: 'width=0', 'height=0', 'clusters=256',
1844 'min_value=0%', 'max_value=100%',
1845 'show_axes=1' and 'expression=i'.
1846
1847 display_parametric:
1848 _width>0,_height>0,_outline_opacity,_ver‐
1849 tex_radius>=0,_is_antialiased={ 0 | 1 },
1850 _is_decorated={ 0 | 1 },_xlabel,_ylabel
1851
1852 Render 2D or 3D parametric curve or point clouds from selected
1853 image data.
1854 Curve points are defined as pixels of a 2 or 3-channel image.
1855 If the point image contains more than 3 channels, additional
1856 channels define the (R,G,B) color
1857 for each vertex.
1858 If 'outline_opacity>1', the outline is colored according to the
1859 specified vertex colors and
1860 'outline_opacity-1' is used as the actual drawing opacity.
1861
1862 Default values: 'width=512', 'height=width', 'outline_opac‐
1863 ity=3', 'vertex_radius=0',
1864 'is_antialiased=1','is_decorated=1', 'xlabel="x-axis"' and
1865 'ylabel="y-axis"'.
1866
1867 display_parallel:
1868
1869 Display each selected image in a separate interactive display
1870 window.
1871 (eq. to 'dp').
1872
1873 display_parallel0:
1874
1875 Display each selected image in a separate interactive display
1876 window, without value
1877 normalization.
1878 (eq. to 'dp0').
1879
1880 display_polar:
1881 _width>32,_height>32,_out‐
1882 line_type,_fill_R,_fill_G,_fill_B,_theta_start,
1883 _theta_end,_xlabel,_ylabel
1884
1885 Render polar curve from selected image data.
1886 'outline_type' can be { r<0=dots with radius -r | 0=no outline
1887 | r>0=lines+dots with radius r }.
1888 'fill_color' can be { -1=no fill | R,G,B=fill with specified
1889 color }.
1890
1891 Default values: 'width=500', 'height=width', 'outline_type=1',
1892 'fill_R=fill_G=fill_B=200',
1893 'theta_start=0', 'theta_end=360', 'xlabel="x-axis"' and 'yla‐
1894 bel="y-axis"'.
1895
1896 display_quiver:
1897 _size_factor>0,_arrow_size>=0,_color_mode={ 0=monochrome |
1898 1=grayscale | 2=color }
1899
1900 Render selected images of 2D vectors as a field of 2D arrows.
1901 (eq. to 'dq').
1902
1903 Default values: 'size_factor=16', 'arrow_size=1.5' and
1904 'color_mode=1'.
1905
1906 display_rgba:
1907 _background_RGB_color
1908
1909 Render selected RGBA images over a checkerboard or colored
1910 background.
1911 (eq. to 'drgba').
1912
1913 Default values: 'background_RGB_color=undefined' (checker‐
1914 board).
1915
1916 display_tensors:
1917 _size_factor>0,_ellipse_size>=0,_color_mode={ 0=monochrome |
1918 1=grayscale |
1919 2=color },_outline>=0
1920
1921 Render selected images of tensors as a field of 2D ellipses.
1922 (eq. to 'dt').
1923
1924 Default values: 'size_factor=16', 'ellipse_size=1.5',
1925 'color_mode=2' and 'outline=2'.
1926
1927 display_warp:
1928 _cell_size>0
1929
1930 Render selected 2D warping fields.
1931 (eq. to 'dw').
1932
1933 Default value: 'cell_size=15'.
1934
1935 document_gmic:
1936 _format={ ascii | bash | html | images | latex
1937 },_image_path,_write_wrapper={ 0 | 1 }
1938
1939 Create documentation of .gmic command files (loaded as raw
1940 'uchar' images), in specified format.
1941
1942 Default values: 'format=ascii', 'image_path=""' and
1943 'write_wrapper=1'.
1944 Example(s) : raw:filename.gmic,char document_gmic html,img
1945
1946 echo (+):
1947 message
1948
1949 Output specified message on the error output.
1950 (eq. to 'e').
1951 Command selection (if any) stands for displayed call stack sub‐
1952 set instead of image indices.
1953
1954 echo_file:
1955 filename,message
1956
1957 Output specified message, appending it to specified output
1958 file.
1959 (similar to 'echo' for specified output file stream).
1960
1961 echo_stdout:
1962 message
1963
1964 Output specified message, on the standard output (stdout).
1965 (similar to 'echo' for output on standard output instead of
1966 standard error).
1967
1968 function1d:
1969 0<=smoothness<=1,x0>=0,y0,x1>=0,y1,...,xn>=0,yn
1970
1971 Insert continuous 1D function from specified list of keypoints
1972 (xk,yk)
1973 in range [0,max(xk)] (xk are positive integers).
1974
1975 Default values: 'smoothness=1' and 'x0=y0=0'.
1976
1977 input (+):
1978 [type:]filename |
1979 [type:]http://URL |
1980 [selection]x_nb_copies>0 |
1981 { width>0[%] | [image_w] },{ _height>0[%] | [image_h] },{
1982 _depth>0[%] |
1983 [image_d] },{ _spectrum>0[%] | [image_s] },_{
1984 value1,_value2,... | 'formula' } |
1985 (value1{,|;|/|^}value2{,|;|/|^}...) |
1986 0
1987
1988 Insert a new image taken from a filename or from a copy of an
1989 existing image [index],
1990 or insert new image with specified dimensions and values. Sin‐
1991 gle quotes may be omitted in
1992 'formula'. Specifying argument '0' inserts an 'empty' image.
1993 (eq. to 'i' | (no arg)).
1994
1995 Default values: 'nb_copies=1', 'height=depth=spectrum=1' and
1996 'value1=0'.
1997
1998 input_cube:
1999 "filename",_convert_1d_cluts_to_3d={ 0 | 1 }.
2000
2001 Insert CLUT data from a .cube filename (Adobe CLUT file for‐
2002 mat).
2003
2004 Default value: 'convert_1d_cluts_to_3d=1'.
2005
2006 input_glob:
2007 pattern
2008
2009 Insert new images from several filenames that match the speci‐
2010 fied glob pattern.
2011
2012 input_gpl:
2013 filename
2014
2015 Input specified filename as a .gpl palette data file.
2016
2017 output (+):
2018 [type:]filename,_format_options
2019
2020 Output selected images as one or several numbered file(s).
2021 (eq. to 'o').
2022
2023 Default value: 'format_options'=(undefined).
2024
2025 output_cube:
2026 filename
2027
2028 Output selected CLUTs as a .cube file (Adobe CLUT format).
2029
2030 output_ggr:
2031 filename,_gradient_name
2032
2033 Output selected images as .ggr gradient files (GIMP).
2034 If no gradient name is specified, it is deduced from the file‐
2035 name.
2036
2037 outputn:
2038 filename,_index
2039
2040 Output selected images as automatically numbered filenames in
2041 repeat...done loops.
2042 (eq. to 'on').
2043
2044 outputp:
2045 prefix
2046
2047 Output selected images as prefixed versions of their original
2048 filenames.
2049 (eq. to 'op').
2050
2051 Default value: 'prefix=_'.
2052
2053 outputw:
2054
2055 Output selected images by overwriting their original location.
2056 (eq. to 'ow').
2057
2058 outputx:
2059 extension1,_extension2,_...,_extensionN,_output_at_same_loca‐
2060 tion={ 0 | 1 }
2061
2062 Output selected images with same base filenames but for N dif‐
2063 ferent extensions.
2064 (eq. to 'ox').
2065
2066 Default value: 'output_at_same_location=0'.
2067
2068 pass (+):
2069 _shared_state={ 0=non-shared (copy) | 1=shared | 2=adaptive }
2070
2071 Insert images from parent context of a custom command or a
2072 local environment.
2073 Command selection (if any) stands for a selection of images in
2074 the parent context.
2075 By default (adaptive shared state), selected images are
2076 inserted in a shared state if they do
2077 not belong
2078 to the context (selection) of the current custom command or
2079 local environment as well.
2080 Typical use of command 'pass' concerns the design of custom
2081 commands that take images as
2082 arguments.
2083
2084 Default value: 'shared_state=2'.
2085
2086 plot (+):
2087 _plot_type,_ver‐
2088 tex_type,_xmin,_xmax,_ymin,_ymax,_exit_on_anykey={ 0 | 1 } |
2089 'formula',_resolution>=0,_plot_type,_ver‐
2090 tex_type,_xmin,xmax,_ymin,_ymax,
2091 _exit_on_anykey={ 0 | 1 }
2092
2093 Display selected images or formula in an interactive viewer
2094 (use the instant display window [0]
2095 if opened).
2096 'plot_type' can be { 0=none | 1=lines | 2=splines | 3=bar }.
2097 'vertex_type' can be { 0=none | 1=points | 2,3=crosses |
2098 4,5=circles | 6,7=squares }.
2099 'xmin','xmax','ymin','ymax' set the coordinates of the dis‐
2100 played xy-axes.
2101
2102 Default values: 'plot_type=1', 'vertex_type=1',
2103 'xmin=xmax=ymin=ymax=0 (auto)' and
2104 'exit_on_anykey=0'.
2105
2106 print (+):
2107
2108 Output information on selected images, on the standard error
2109 (stderr).
2110 (eq. to 'p').
2111
2112 screen (+):
2113 _x0[%],_y0[%],_x1[%],_y1[%]
2114
2115 Take screenshot, optionally grabbed with specified coordinates,
2116 and insert it
2117 at the end of the image list.
2118
2119 select (+):
2120 feature_type,_X[%]>=0,_Y[%]>=0,_Z[%]>=0,_exit_on_anykey={ 0 | 1
2121 },
2122 _is_deep_selection={ 0 | 1 }
2123
2124 Interactively select a feature from selected images (use the
2125 instant display window [0] if opened).
2126 'feature_type' can be { 0=point | 1=segment | 2=rectangle |
2127 3=ellipse }.
2128 Arguments 'X','Y','Z' determine the initial selection view, for
2129 3D volumetric images.
2130 The retrieved feature is returned as a 3D vector (if 'fea‐
2131 ture_type==0') or as a 6d vector
2132 (if 'feature_type!=0') containing the feature coordinates.
2133
2134 Default values: 'X=Y=Z=(undefined)', 'exit_on_anykey=0' and
2135 'is_deep_selection=0'.
2136
2137 serialize (+):
2138 _datatype,_is_compressed={ 0 | 1 },_store_names={ 0 | 1 }
2139
2140 Serialize selected list of images into a single image, option‐
2141 nally in a compressed form.
2142 'datatype' can be { auto | uchar | char | ushort | short | uint
2143 | int | uint64 | int64 | float |
2144 double }.
2145 Specify 'datatype' if all selected images have a range of val‐
2146 ues constrained to a particular datatype,
2147 in order to minimize the memory footprint.
2148 The resulting image has only integers values in [0,255] and can
2149 then be saved as a raw image of
2150 unsigned chars (doing so will output a valid .cimg[z] or .gmz
2151 file).
2152 If 'store_names' is set to '1', serialization uses the .gmz
2153 format to store data in memory
2154 (otherwise the .cimg[z] format).
2155
2156 Default values: 'datatype=auto', 'is_compressed=1' and
2157 'store_names=1'.
2158
2159 shape_circle:
2160 _size>=0
2161
2162 Input a 2D circle binary shape with specified size.
2163
2164 Default value: 'size=512'.
2165
2166 shape_cupid:
2167 _size>=0
2168
2169 Input a 2D cupid binary shape with specified size.
2170
2171 Default value: 'size=512'.
2172
2173 shape_diamond:
2174 _size>=0
2175
2176 Input a 2D diamond binary shape with specified size.
2177
2178 Default value: 'size=512'.
2179
2180 shape_fern:
2181 _size>=0,_density[%]>=0,_angle,0<=_opacity<=1,_type={ 0=Asple‐
2182 nium
2183 adiantum-nigrum | 1=Thelypteridaceae }
2184
2185 Input a 2D Barnsley fern with specified size.
2186
2187 Default value: 'size=512', 'density=50%', 'angle=30', 'opac‐
2188 ity=0.3' and 'type=0'.
2189
2190 shape_gear:
2191 _size>=0,_nb_teeth>0,0<=_height_teeth<=100,0<=_off‐
2192 set_teeth<=100,
2193 0<=_inner_radius<=100
2194
2195 Input a 2D gear binary shape with specified size.
2196
2197 Default value: 'size=512', 'nb_teeth=12', 'height_teeth=20',
2198 'offset_teeth=0' and
2199 'inner_radius=40'.
2200
2201 shape_heart:
2202 _size>=0
2203
2204 Input a 2D heart binary shape with specified size.
2205
2206 Default value: 'size=512'.
2207
2208 shape_polygon:
2209 _size>=0,_nb_vertices>=3,_angle
2210
2211 Input a 2D polygonal binary shape with specified geometry.
2212
2213 Default value: 'size=512', 'nb_vertices=5' and 'angle=0'.
2214
2215 shape_snowflake:
2216 size>=0,0<=_nb_recursions<=6
2217
2218 Input a 2D snowflake binary shape with specified size.
2219
2220 Default values: 'size=512' and 'nb_recursions=5'.
2221
2222 shape_star:
2223 _size>=0,_nb_branches>0,0<=_thickness<=1
2224
2225 Input a 2D star binary shape with specified size.
2226
2227 Default values: 'size=512', 'nb_branches=5' and 'thick‐
2228 ness=0.38'.
2229
2230 shared (+):
2231 x0[%],x1[%],y[%],z[%],v[%] |
2232 y0[%],y1[%],z[%],v[%] |
2233 z0[%],z1[%],v[%] |
2234 v0[%],v1[%] |
2235 v0[%] |
2236 (no arg)
2237
2238 Insert shared buffers from (opt. points/rows/planes/channels
2239 of) selected images.
2240 Shared buffers cannot be returned by a command, nor a local
2241 environment.
2242 (eq. to 'sh').
2243
2244 sample:
2245 _name1={ ? | apples | balloons | barbara | boats | bottles |
2246 butterfly |
2247 cameraman | car | cat | cliff | chick | colorful | david |
2248 dog | duck | eagle |
2249 elephant | earth | flower | fruits | gmicky | gmicky_mahvin |
2250 gmicky_wilber |
2251 greece | gummy | house | inside | landscape | leaf | lena |
2252 leno | lion |
2253 mandrill | monalisa | monkey | parrots | pencils | peppers |
2254 portrait0 |
2255 portrait1 | portrait2 | portrait3 | portrait4 | portrait5 |
2256 portrait6 |
2257 portrait7 | portrait8 | portrait9 | roddy | rooster | rose |
2258 square | swan |
2259 teddy | tiger | tulips | wall | waterfall | zelda
2260 },_name2,...,_nameN,_width={
2261 >=0 | 0 (auto) },_height = { >=0 | 0 (auto) } |
2262 (no arg)
2263
2264 Input a new sample RGB image (opt. with specified size).
2265 (eq. to 'sp').
2266 Argument 'name' can be replaced by an integer which serves as a
2267 sample index.
2268
2269 srand (+):
2270 value |
2271 (no arg)
2272
2273 Set random generator seed.
2274 If no argument is specified, a random value is used as the ran‐
2275 dom generator seed.
2276
2277 string:
2278 "string"
2279
2280 Insert new image containing the ascii codes of specified
2281 string.
2282
2283 testimage2d:
2284 _width>0,_height>0,_spectrum>0
2285
2286 Input a 2D synthetic image.
2287
2288 Default values: 'width=512', 'height=width' and 'spectrum=3'.
2289
2290 uncommand (+):
2291 command_name[,_command_name2,...] |
2292 *
2293
2294 Discard definition of specified custom commands.
2295 Set argument to '*' for discarding all existing custom com‐
2296 mands.
2297
2298 uniform_distribution:
2299 nb_levels>=1,spectrum>=1
2300
2301 Input set of uniformly distributed spectrum-d points in
2302 [0,1]^spectrum.
2303
2304 unserialize (+):
2305
2306 Recreate lists of images from serialized image buffers,
2307 obtained with command 'serialize'.
2308
2309 update:
2310
2311 Update commands from the latest definition file on the G'MIC
2312 server.
2313 (eq. to 'up').
2314
2315 verbose (+):
2316 level |
2317 { + | - }
2318
2319 Set or increment/decrement the verbosity level. Default level
2320 is 0.
2321 (eq. to 'v').
2322 When 'level'>=0, G'MIC log messages are displayed on the stan‐
2323 dard error (stderr).
2324
2325 Default value: 'level=0'.
2326
2327 wait (+):
2328 delay |
2329 (no arg)
2330
2331 Wait for a given delay (in ms), optionally since the last call
2332 to 'wait'.
2333 or wait for a user event occurring on the selected instant dis‐
2334 play windows.
2335 'delay' can be { <0=delay+flush events | 0=event | >0=delay }.
2336 Command selection (if any) stands for instant display window
2337 indices instead of image indices.
2338 If no window indices are specified and if 'delay' is positive,
2339 the command results
2340 in a 'hard' sleep during specified delay.
2341
2342 Default value: 'delay=0'.
2343
2344 warn (+):
2345 _force_visible={ 0 | 1 },_message
2346
2347 Print specified warning message, on the standard error
2348 (stderr).
2349 Command selection (if any) stands for displayed call stack sub‐
2350 set instead of image indices.
2351
2352 window (+):
2353 _width[%]>=-1,_height[%]>=-1,_normaliza‐
2354 tion,_fullscreen,_pos_x[%],_pos_y[%],_title
2355
2356 Display selected images into an instant display window with
2357 specified size, normalization type,
2358 fullscreen mode and title.
2359 (eq. to 'w').
2360 If 'width' or 'height' is set to -1, the corresponding dimen‐
2361 sion is adjusted to the window
2362 or image size.
2363 When arguments 'pos_x' and 'pos_y' are both different than -1,
2364 the window is moved to
2365 the specified coordinates.
2366 'width'=0 or 'height'=0 closes the instant display window.
2367 'normalization' can be { -1=keep same | 0=none | 1=always |
2368 2=1st-time | 3=auto }.
2369 'fullscreen' can be { -1=keep same | 0=no | 1=yes }.
2370 You can manage up to 10 different instant display windows by
2371 using the numbered variants
2372 'w0' (default, eq. to 'w'),'w1',...,'w9' of the command 'w'.
2373 Invoke 'window' with no selection to make the window visible,
2374 if is has been closed by the user.
2375
2376 Default values: 'width=height=normalization=fullscreen=-1' and
2377 'title=(undefined)'.
2378
2379 ** List Manipulation:
2380
2381 keep (+):
2382
2383 Keep only selected images.
2384 (eq. to 'k').
2385
2386 move (+):
2387 position[%]
2388
2389 Move selected images at specified position.
2390 (eq. to 'mv').
2391
2392 name (+):
2393 "name1","name2",...
2394
2395 Set names of selected images.
2396 - If the selection contains a single image, then it is assumed
2397 the command has a single name
2398 argument (possibly containing multiple comas).
2399 - If the selection contains more than one image, each command
2400 argument defines a single image
2401 name for each image of the selection.
2402 (eq. to 'nm').
2403
2404 remove (+):
2405
2406 Remove selected images.
2407 (eq. to 'rm').
2408
2409 remove_duplicates:
2410
2411 Remove duplicates images in the selected images list.
2412
2413 remove_empty:
2414
2415 Remove empty images in the selected image list.
2416
2417 reverse (+):
2418
2419 Reverse positions of selected images.
2420 (eq. to 'rv').
2421
2422 sort_list:
2423 _ordering={ + | - },_criterion
2424
2425 Sort list of selected images according to the specified image
2426 criterion.
2427
2428 Default values: 'ordering=+', 'criterion=i'.
2429
2430 sort_str:
2431
2432 Sort selected images (viewed as a list of strings) in lexico‐
2433 graphic order.
2434
2435 ** Mathematical Operators:
2436
2437 abs (+):
2438
2439 Compute the pointwise absolute values of selected images.
2440
2441 acos (+):
2442
2443 Compute the pointwise arccosine of selected images.
2444
2445 acosh (+):
2446
2447 Compute the pointwise hyperbolic arccosine of selected images.
2448
2449 add (+):
2450 value[%] |
2451 [image] |
2452 'formula' |
2453 (no arg)
2454
2455 Add specified value, image or mathematical expression to
2456 selected images,
2457 or compute the pointwise sum of selected images.
2458 (eq. to '+').
2459
2460 and (+):
2461 value[%] |
2462 [image] |
2463 'formula' |
2464 (no arg)
2465
2466 Compute the bitwise AND of selected images with specified
2467 value, image or mathematical
2468 expression, or compute the pointwise sequential bitwise AND of
2469 selected images.
2470 (eq. to '&').
2471
2472 argmax:
2473
2474 Compute the argmax of selected images. Returns a single image
2475 with each pixel value being the index of the input image with
2476 maximal value.
2477
2478 argmin:
2479
2480 Compute the argmin of selected images. Returns a single image
2481 with each pixel value being the index of the input image with
2482 minimal value.
2483
2484 asin (+):
2485
2486 Compute the pointwise arcsine of selected images.
2487
2488 asinh (+):
2489
2490 Compute the pointwise hyperbolic arcsine of selected images.
2491
2492 atan (+):
2493
2494 Compute the pointwise arctangent of selected images.
2495
2496 atan2 (+):
2497 [x_argument]
2498
2499 Compute the pointwise oriented arctangent of selected images.
2500 Each selected image is regarded as the y-argument of the arc‐
2501 tangent function, while the
2502 specified image gives the corresponding x-argument.
2503
2504 atanh (+):
2505
2506 Compute the pointwise hyperbolic arctangent of selected images.
2507
2508 bsl (+):
2509 value[%] |
2510 [image] |
2511 'formula' |
2512 (no arg)
2513
2514 Compute the bitwise left shift of selected images with speci‐
2515 fied value, image or
2516 mathematical expression, or compute the pointwise sequential
2517 bitwise left shift of
2518 selected images.
2519 (eq. to '<<').
2520
2521 bsr (+):
2522 value[%] |
2523 [image] |
2524 'formula' |
2525 (no arg)
2526
2527 Compute the bitwise right shift of selected images with speci‐
2528 fied value, image or"
2529 mathematical expression, or compute the pointwise sequential
2530 bitwise right shift of
2531 selected images.
2532 (eq. to '>>').
2533
2534 cos (+):
2535
2536 Compute the pointwise cosine of selected images.
2537
2538 cosh (+):
2539
2540 Compute the pointwise hyperbolic cosine of selected images.
2541
2542 div (+):
2543 value[%] |
2544 [image] |
2545 'formula' |
2546 (no arg)
2547
2548 Divide selected images by specified value, image or mathemati‐
2549 cal expression,
2550 or compute the pointwise quotient of selected images.
2551 (eq. to '/').
2552
2553 div_complex:
2554 [divider_real,divider_imag],_epsilon>=0
2555
2556 Perform division of the selected complex pairs
2557 (real1,imag1,...,realN,imagN) of images by
2558 specified complex pair of images (divider_real,divider_imag).
2559 In complex pairs, the real image must be always located before
2560 the imaginary image in the image list.
2561
2562 Default value: 'epsilon=1e-8'.
2563
2564 eq (+):
2565 value[%] |
2566 [image] |
2567 'formula' |
2568 (no arg)
2569
2570 Compute the boolean equality of selected images with specified
2571 value, image or
2572 mathematical expression, or compute the boolean equality of
2573 selected images.
2574 (eq. to '==').
2575
2576 exp (+):
2577
2578 Compute the pointwise exponential of selected images.
2579
2580 ge (+):
2581 value[%] |
2582 [image] |
2583 'formula' |
2584 (no arg)
2585
2586 Compute the boolean 'greater or equal than' of selected images
2587 with specified value, image
2588 or mathematical expression, or compute the boolean 'greater or
2589 equal than' of selected images.
2590 (eq. to '>=').
2591
2592 gt (+):
2593 value[%] |
2594 [image] |
2595 'formula' |
2596 (no arg)
2597
2598 Compute the boolean 'greater than' of selected images with
2599 specified value, image or
2600 mathematical expression, or compute the boolean 'greater than'
2601 of selected images.
2602 (eq. to '>').
2603
2604 le (+):
2605 value[%] |
2606 [image] |
2607 'formula' |
2608 (no arg)
2609
2610 Compute the boolean 'less or equal than' of selected images
2611 with specified value, image or
2612 mathematical expression, or compute the boolean 'less or equal
2613 than' of selected images.
2614 (eq. to '<=').
2615
2616 lt (+):
2617 value[%] |
2618 [image] |
2619 'formula' |
2620 (no arg)
2621
2622 Compute the boolean 'less than' of selected images with speci‐
2623 fied value, image or
2624 mathematical expression, or compute the boolean 'less than' of
2625 selected images.
2626 (eq. to '<').
2627
2628 log (+):
2629
2630 Compute the pointwise base-e logarithm of selected images.
2631
2632 log10 (+):
2633
2634 Compute the pointwise base-10 logarithm of selected images.
2635
2636 log2 (+):
2637
2638 Compute the pointwise base-2 logarithm of selected images
2639
2640 max (+):
2641 value[%] |
2642 [image] |
2643 'formula' |
2644 (no arg)
2645
2646 Compute the maximum between selected images and specified
2647 value, image or
2648 mathematical expression, or compute the pointwise maxima
2649 between selected images.
2650
2651 mdiv (+):
2652 value[%] |
2653 [image] |
2654 'formula' |
2655 (no arg)
2656
2657 Compute the matrix division of selected matrices/vectors by
2658 specified value, image or
2659 mathematical expression, or compute the matrix division of
2660 selected images.
2661 (eq. to 'm/').
2662
2663 min (+):
2664 value[%] |
2665 [image] |
2666 'formula' |
2667 (no arg)
2668
2669 Compute the minimum between selected images and specified
2670 value, image or
2671 mathematical expression, or compute the pointwise minima
2672 between selected images.
2673
2674 mod (+):
2675 value[%] |
2676 [image] |
2677 'formula' |
2678 (no arg)
2679
2680 Compute the modulo of selected images with specified value,
2681 image or mathematical
2682 expression, or compute the pointwise sequential modulo of
2683 selected images.
2684 (eq. to '%').
2685
2686 mmul (+):
2687 value[%] |
2688 [image] |
2689 'formula' |
2690 (no arg)
2691
2692 Compute the matrix right multiplication of selected matri‐
2693 ces/vectors by specified value, image or
2694 mathematical expression, or compute the matrix right multipli‐
2695 cation of selected images.
2696 (eq. to 'm*').
2697
2698 mul (+):
2699 value[%] |
2700 [image] |
2701 'formula' |
2702 (no arg)
2703
2704 Multiply selected images by specified value, image or mathemat‐
2705 ical expression,
2706 or compute the pointwise product of selected images.
2707 (eq. to '*').
2708
2709 mul_channels:
2710 value1,_value2,...,_valueN
2711
2712 Multiply channels of selected images by specified sequence of
2713 values.
2714
2715 mul_complex:
2716 [multiplier_real,multiplier_imag]
2717
2718 Perform multiplication of the selected complex pairs
2719 (real1,imag1,...,realN,imagN) of images by
2720 specified complex pair of images (multiplier_real,multi‐
2721 plier_imag).
2722 In complex pairs, the real image must be always located before
2723 the imaginary image in the image list.
2724
2725 neq (+):
2726 value[%] |
2727 [image] |
2728 'formula' |
2729 (no arg)
2730
2731 Compute the boolean inequality of selected images with speci‐
2732 fied value, image or
2733 mathematical expression, or compute the boolean inequality of
2734 selected images.
2735 (eq. to '!=').
2736
2737 or (+):
2738 value[%] |
2739 [image] |
2740 'formula' |
2741 (no arg)
2742
2743 Compute the bitwise OR of selected images with specified value,
2744 image or mathematical
2745 expression, or compute the pointwise sequential bitwise OR of
2746 selected images.
2747 (eq. to '|').
2748
2749 pow (+):
2750 value[%] |
2751 [image] |
2752 'formula' |
2753 (no arg)
2754
2755 Raise selected images to the power of specified value, image or
2756 mathematical
2757 expression, or compute the pointwise sequential powers of
2758 selected images.
2759 (eq. to '^').
2760
2761 rol (+):
2762 value[%] |
2763 [image] |
2764 'formula' |
2765 (no arg)
2766
2767 Compute the bitwise left rotation of selected images with spec‐
2768 ified value, image or
2769 mathematical expression, or compute the pointwise sequential
2770 bitwise left rotation of
2771 selected images.
2772
2773 ror (+):
2774 value[%] |
2775 [image] |
2776 'formula' |
2777 (no arg)
2778
2779 Compute the bitwise right rotation of selected images with
2780 specified value, image or
2781 mathematical expression, or compute the pointwise sequential
2782 bitwise right rotation of
2783 selected images.
2784
2785 sign (+):
2786
2787 Compute the pointwise sign of selected images.
2788
2789 sin (+):
2790
2791 Compute the pointwise sine of selected images.
2792
2793 sinc (+):
2794
2795 Compute the pointwise sinc function of selected images.
2796
2797 sinh (+):
2798
2799 Compute the pointwise hyperbolic sine of selected images.
2800
2801 sqr (+):
2802
2803 Compute the pointwise square function of selected images.
2804
2805 sqrt (+):
2806
2807 Compute the pointwise square root of selected images.
2808
2809 sub (+):
2810 value[%] |
2811 [image] |
2812 'formula' |
2813 (no arg)
2814
2815 Subtract specified value, image or mathematical expression to
2816 selected images,
2817 or compute the pointwise difference of selected images.
2818 (eq. to '-').
2819
2820 tan (+):
2821
2822 Compute the pointwise tangent of selected images.
2823
2824 tanh (+):
2825
2826 Compute the pointwise hyperbolic tangent of selected images.
2827
2828 xor (+):
2829 value[%] |
2830 [image] |
2831 'formula' |
2832 (no arg)
2833
2834 Compute the bitwise XOR of selected images with specified
2835 value, image or mathematical
2836 expression, or compute the pointwise sequential bitwise XOR of
2837 selected images.
2838
2839 ** Values Manipulation:
2840
2841 apply_curve:
2842 0<=smoothness<=1,x0,y0,x1,y1,x2,y2,...,xN,yN
2843
2844 Apply curve transformation to image values.
2845
2846 Default values: 'smoothness=1', 'x0=0', 'y0=100'.
2847
2848 apply_gamma:
2849 gamma>=0
2850
2851 Apply gamma correction to selected images.
2852
2853 balance_gamma:
2854 _ref_color1,...
2855
2856 Compute gamma-corrected color balance of selected image, with
2857 respect to specified reference color.
2858
2859 Default value: 'ref_color1=128'.
2860
2861 cast:
2862 datatype_source,datatype_target
2863
2864 Cast datatype of image buffer from specified source type to
2865 specified target type.
2866 'datatype_source' and 'datatype_target' can be { uchar | char |
2867 ushort | short | uint | int |
2868 uint64 | int64 | float | double }.
2869
2870 complex2polar:
2871
2872 Compute complex to polar transforms of selected images.
2873
2874 compress_clut:
2875 _max_error>0,_avg_error>0,_max_nbpoints>=8
2876
2877 Compress selected color LUTs as sequences of colored keypoints.
2878
2879 Default values: 'max_error=8', 'avg_error=2' and
2880 'max_nb_points=2048'.
2881
2882 compress_rle:
2883 _is_binary_data={ 0 | 1 },_maximum_sequence_length>=0
2884
2885 Compress selected images as 2xN data matrices, using RLE algo‐
2886 rithm.
2887 Set 'maximum_sequence_length=0' to disable maximum length con‐
2888 straint.
2889
2890 Default values: 'is_binary_data=0' and 'maxi‐
2891 mum_sequence_length=0'.
2892
2893 cumulate (+):
2894 { x | y | z | c }...{ x | y | z | c } |
2895 (no arg)
2896
2897 Compute the cumulative function of specified image data,
2898 optionally along the specified axes.
2899
2900 cut (+):
2901 { value0[%] | [image0] },{ value1[%] | [image1] } |
2902 [image]
2903
2904 Cut values of selected images in specified range.
2905 (eq. to 'c').
2906
2907 decompress_clut_rbf:
2908 _width>0,_height>0,_depth>0
2909
2910 Decompress selected colored keypoints into 3D CLUTs, using RBF
2911 thin plate spline interpolation.
2912
2913 Default value: 'width=height=depth=48'.
2914
2915 decompress_clut_pde:
2916 _width>0,_height>0,_depth>0
2917
2918 Decompress selected colored keypoints into 3D CLUTs, using mul‐
2919 tiscale diffusion PDE's.
2920
2921 Default values: 'width=height=depth=48'.
2922
2923 decompress_clut:
2924 _width>0,_height>0,_depth>0
2925
2926 Decompress selected colored keypoints into 3D CLUTs, using a
2927 mixed RBF/PDE approach.
2928
2929 Default values: 'width=height=depth=48'.
2930
2931 decompress_rle:
2932
2933 Decompress selected data vectors, using RLE algorithm.
2934
2935 discard (+):
2936 _value1,_value2,... |
2937 { x | y | z | c}...{ x | y | z | c},_value1,_value2,... |
2938 (no arg)
2939
2940 Discard specified values in selected images or discard neigh‐
2941 boring duplicate values,
2942 optionally only for the values along the first of a specified
2943 axis.
2944 If no values are specified, neighboring duplicate values are
2945 discarded.
2946 If all pixels of a selected image are discarded, an empty image
2947 is returned.
2948
2949 eigen2tensor:
2950
2951 Recompose selected pairs of eigenvalues/eigenvectors as 2x2 or
2952 3x3 tensor fields.
2953
2954 endian (+):
2955 _datatype
2956
2957 Reverse data endianness of selected images, eventually consid‐
2958 ering the pixel being of the
2959 specified datatype.
2960 'datatype' can be { uchar | char | ushort | short | uint | int
2961 | uint64 | int64 | float | double }.
2962
2963 equalize (+):
2964 _nb_levels>0[%],_value_min[%],_value_max[%]
2965
2966 Equalize histograms of selected images.
2967 If value range is specified, the equalization is done only for
2968 pixels in the specified
2969 value range.
2970
2971 Default values: 'nb_levels=256', 'value_min=0%' and
2972 'value_max=100%'.
2973
2974 fill (+):
2975 value1,_value2,... |
2976 [image] |
2977 'formula'
2978
2979 Fill selected images with values read from the specified value
2980 list, existing image
2981 or mathematical expression. Single quotes may be omitted in
2982 'formula'.
2983 (eq. to 'f').
2984
2985 index (+):
2986 { [palette] | predefined_palette },0<=_dithering<=1,_map_pal‐
2987 ette={ 0 | 1 }
2988
2989 Index selected vector-valued images by specified vector-valued
2990 palette.
2991 'predefined_palette' can be { 0=default | 1=HSV | 2=lines |
2992 3=hot | 4=cool | 5=jet | 6=flag | 7=cube }.
2993
2994 Default values: 'dithering=0' and 'map_palette=0'.
2995
2996 inrange:
2997 min[%],max[%]
2998
2999 Detect pixels whose values are in specified range [min,max], in
3000 selected images.
3001 (eq. to 'ir').
3002
3003 map (+):
3004 [palette],_boundary_conditions |
3005 predefined_palette,_boundary_conditions
3006
3007 Map specified vector-valued palette to selected indexed scalar
3008 images.
3009 'predefined_palette' can be { 0=default | 1=HSV | 2=lines |
3010 3=hot | 4=cool | 5=jet | 6=flag | 7=cube }.
3011 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
3012 2=periodic | 3=mirror }.
3013
3014 Default value: 'boundary_conditions=0'.
3015
3016 map_clut:
3017 [clut] | "clut_name"
3018
3019 Map specified RGB color LUT to selected images.
3020
3021 mix_channels:
3022 (a00,...,aMN) |
3023 [matrix]
3024
3025 Apply specified matrix to channels of selected images.
3026
3027 negate:
3028 base_value |
3029 (no arg)
3030
3031 Negate image values.
3032
3033 Default value: 'base_value=(undefined)'.
3034
3035 noise (+):
3036 std_deviation>=0[%],_noise_type
3037
3038 Add random noise to selected images.
3039 'noise_type' can be { 0=gaussian | 1=uniform | 2=salt&pepper |
3040 3=poisson | 4=rice }.
3041
3042 Default value: 'noise_type=0'.
3043
3044 noise_perlin:
3045 _scale_x[%]>0,_scale_y[%]>0,_scale_z[%]>0,_seed_x,_seed_y,_seed_z
3046
3047 Render 2D or 3D Perlin noise on selected images, from specified
3048 coordinates.
3049 The Perlin noise is a specific type of smooth noise,
3050 described here : 'https://en.wikipedia.org/wiki/Perlin_noise'.
3051
3052 Default values: 'scale_x=scale_y=scale_z=16' and
3053 'seed_x=seed_y=seed_z=0'.
3054
3055 noise_poissondisk:
3056 _radius[%]>0,_max_sample_attempts>0
3057
3058 Add poisson disk sampling noise to selected images.
3059 Implements the algorithm from the article "Fast Poisson Disk
3060 Sampling in Arbitrary Dimensions",
3061 by Robert Bridson (SIGGRAPH'2007).
3062
3063 Default values: 'radius=8' and 'max_sample_attempts=30'.
3064
3065 normp:
3066 p>=0
3067
3068 Compute the pointwise Lp-norm norm of vector-valued pixels in
3069 selected images.
3070
3071 Default value: 'p=2'.
3072
3073 norm:
3074
3075 Compute the pointwise euclidean norm of vector-valued pixels in
3076 selected images.
3077
3078 normalize (+):
3079 { value0[%] | [image0] },{ value1[%] | [image1] } |
3080 [image]
3081
3082 Linearly normalize values of selected images in specified
3083 range.
3084 (eq. to 'n').
3085
3086 normalize_sum:
3087
3088 Normalize selected images with a unitary sum.
3089
3090 not:
3091
3092 Apply boolean not operation on selected images.
3093
3094 orientation:
3095
3096 Compute the pointwise orientation of vector-valued pixels in
3097 selected images.
3098
3099 oneminus:
3100
3101 For each selected image, compute one minus image.
3102
3103 otsu:
3104 _nb_levels>0
3105
3106 Hard-threshold selected images using Otsu's method.
3107 The computed thresholds are returned as a list of values in the
3108 status.
3109
3110 Default value: 'nb_levels=256'.
3111
3112 polar2complex:
3113
3114 Compute polar to complex transforms of selected images.
3115
3116 quantize:
3117 nb_levels>=1,_keep_values={ 0 | 1 },_is_uniform={ 0 | 1 }
3118
3119 Quantize selected images.
3120
3121 Default value: 'keep_values=1' and 'is_uniform=0'.
3122
3123 quantize_area:
3124 _min_area>0
3125
3126 Quantize selected images such that each flat region has an area
3127 greater or equal to 'min_area'.
3128
3129 Default value: 'min_area=10'.
3130
3131 rand (+):
3132 { value0[%] | [image0] },_{ value1[%] | [image1] } |
3133 [image]
3134
3135 Fill selected images with random values uniformly distributed
3136 in the specified range.
3137
3138 replace:
3139 source,target
3140
3141 Replace pixel values in selected images.
3142
3143 replace_inf:
3144 _expression
3145
3146 Replace all infinite values in selected images by specified
3147 expression.
3148
3149 replace_nan:
3150 _expression
3151
3152 Replace all NaN values in selected images by specified expres‐
3153 sion.
3154
3155 replace_seq:
3156 "search_seq","replace_seq"
3157
3158 Search and replace a sequence of values in selected images.
3159
3160 replace_str:
3161 "search_str","replace_str"
3162
3163 Search and replace a string in selected images (viewed as
3164 strings, i.e. sequences of ascii codes).
3165
3166 round (+):
3167 rounding_value>=0,_rounding_type |
3168 (no arg)
3169
3170 Round values of selected images.
3171 'rounding_type' can be { -1=backward | 0=nearest | 1=forward }.
3172
3173 Default value: 'rounding_type=0'.
3174
3175 roundify:
3176 gamma>=0
3177
3178 Apply roundify transformation on float-valued data, with speci‐
3179 fied gamma.
3180
3181 Default value: 'gamma=0'.
3182
3183 set (+):
3184 value,_x[%],_y[%],_z[%],_c[%]
3185
3186 Set pixel value in selected images, at specified coordinates.
3187 (eq. to '=').
3188 If specified coordinates are outside the image bounds, no
3189 action is performed.
3190
3191 Default values: 'x=y=z=c=0'.
3192
3193 set_vector_covariance:
3194 coef1,coef2,...,coefN
3195
3196 Apply linear transformation on selected images so that the
3197 covariance matrix of their
3198 vector-valued pixels
3199 is prescribed to given matrix. Matrix size 'N' must be equal to
3200 'spectrum^2'.
3201
3202 threshold:
3203 value[%],_is_soft={ 0 | 1 } :
3204
3205 Threshold values of selected images.
3206 'soft' can be { 0=hard-thresholding | 1=soft-thresholding }.
3207
3208 Default value: 'is_soft=0'.
3209
3210 unrepeat:
3211
3212 Remove repetition of adjacent values in selected images.
3213
3214 vector2tensor:
3215
3216 Convert selected vector fields to corresponding tensor fields.
3217
3218 ** Colors Manipulation:
3219
3220 adjust_colors:
3221 -100<=_brightness<=100,-100<=_contrast<=100,-100<=_gamma<=100,
3222 -100<=_hue_shift<=100,-100<=_satura‐
3223 tion<=100,_value_min,_value_max
3224
3225 Perform a global adjustment of colors on selected images.
3226 Range of correct image values are considered to be in
3227 [value_min,value_max] (e.g. [0,255]).
3228 If 'value_min==value_max==0', value range is estimated from
3229 min/max values of selected images.
3230 Processed images have pixel values constrained in
3231 [value_min,value_max].
3232
3233 Default values: 'brightness=0', 'contrast=0', 'gamma=0',
3234 'hue_shift=0', 'saturation=0',
3235 'value_min=value_max=0'.
3236
3237 apply_channels:
3238 "command",color_channels,_value_action={ 0=none | 1=cut |
3239 2=normalize }
3240
3241 Apply specified command on the chosen color channel(s) of each
3242 selected images.
3243 (eq. to 'ac').
3244 Argument 'color_channels' refers to a colorspace, and can be
3245 basically one of
3246 { all | rgba | rgb | ryb | lrgb | ycbcr | lab | lch | hsv | hsi
3247 | hsl | cmy | cmyk | yiq }.
3248 You can also make the processing focus on a few particular
3249 channels of this colorspace,
3250 by setting 'color_channels' as 'colorspace_channel' (e.g.
3251 'hsv_h' for the hue).
3252 All channel values are considered to be provided in the [0,255]
3253 range.
3254
3255 Default value: 'value_action=0'.
3256
3257 autoindex:
3258 nb_colors>0,0<=_dithering<=1,_method={ 0=median-cut | 1=k-means
3259 }
3260
3261 Index selected vector-valued images by adapted colormaps.
3262
3263 Default values: 'dithering=0' and 'method=1'.
3264
3265 bayer2rgb:
3266 _GM_smoothness,_RB_smoothness1,_RB_smoothness2
3267
3268 Transform selected RGB-Bayer sampled images to color images.
3269
3270 Default values: 'GM_smoothness=RB_smoothness=1' and 'RB_smooth‐
3271 ness2=0.5'.
3272
3273 cmy2rgb:
3274
3275 Convert color representation of selected images from CMY to
3276 RGB.
3277
3278 cmyk2rgb:
3279
3280 Convert color representation of selected images from CMYK to
3281 RGB.
3282
3283 colorblind:
3284 type={ 0=protanopia | 1=protanomaly | 2=deuteranopia |
3285 3=deuteranomaly |
3286 4=tritanopia | 5=tritanomaly | 6=achromatopsia | 7=achro‐
3287 matomaly }
3288
3289 Simulate color blindness vision.
3290
3291 colormap:
3292 nb_levels>=0,_method={ 0=median-cut | 1=k-means },_sort_vec‐
3293 tors={ 0 | 1 }
3294
3295 Estimate best-fitting colormap with 'nb_colors' entries, to
3296 index selected images.
3297 Set 'nb_levels==0' to extract all existing colors of an image.
3298
3299 Default value: 'method=1' and 'sort_vectors=1'.
3300
3301 compose_channels:
3302
3303 Compose all channels of each selected image, using specified
3304 arithmetic operator (+,-,or,min,...).
3305
3306 Default value: '1=+'.
3307
3308 direction2rgb:
3309
3310 Compute RGB representation of selected 2D direction fields.
3311
3312 ditheredbw:
3313
3314 Create dithered B&W version of selected images.
3315
3316 fill_color:
3317 col1,...,colN
3318
3319 Fill selected images with specified color.
3320 (eq. to 'fc').
3321
3322 gradient2rgb:
3323 _is_orientation={ 0 | 1 }
3324
3325 Compute RGB representation of 2D gradient of selected images.
3326
3327 Default value: 'is_orientation=0'.
3328
3329 hcy2rgb ::
3330
3331 Convert color representation of selected images from HCY to
3332 RGB.
3333
3334 hsi2rgb:
3335
3336 Convert color representation of selected images from HSI to
3337 RGB.
3338
3339 hsi82rgb:
3340
3341 Convert color representation of selected images from HSI8 to
3342 RGB.
3343
3344 hsl2rgb:
3345
3346 Convert color representation of selected images from HSL to
3347 RGB.
3348
3349 hsl82rgb:
3350
3351 Convert color representation of selected images from HSL8 to
3352 RGB.
3353
3354 hsv2rgb:
3355
3356 Convert color representation of selected images from HSV to
3357 RGB.
3358
3359 hsv82rgb:
3360
3361 Convert color representation of selected images from HSV8 to
3362 RGB.
3363
3364 int2rgb:
3365
3366 Convert color representation of selected images from INT24 to
3367 RGB.
3368
3369 lab2lch:
3370
3371 Convert color representation of selected images from Lab to
3372 Lch.
3373
3374 lab2rgb:
3375 illuminant={ 0=D50 | 1=D65 } |
3376 (no arg)
3377
3378 Convert color representation of selected images from Lab to
3379 RGB.
3380
3381 Default value: 'illuminant=1'.
3382
3383 lab2srgb:
3384 illuminant={ 0=D50 | 1=D65 } |
3385 (no arg)
3386
3387 Convert color representation of selected images from Lab to
3388 sRGB.
3389
3390 Default value: 'illuminant=1'.
3391
3392 lab82srgb:
3393 illuminant={ 0=D50 | 1=D65 } |
3394 (no arg)
3395
3396 Convert color representation of selected images from Lab8 to
3397 sRGB.
3398
3399 Default value: 'illuminant=1'.
3400
3401 lab2xyz:
3402 illuminant={ 0=D50 | 1=D65 } |
3403 (no arg)
3404
3405 Convert color representation of selected images from Lab to
3406 XYZ.
3407
3408 Default value: 'illuminant=1'.
3409
3410 lab82rgb:
3411 illuminant={ 0=D50 | 1=D65 } |
3412 (no arg)
3413
3414 Convert color representation of selected images from Lab8 to
3415 RGB.
3416
3417 Default value: 'illuminant=1'.
3418
3419 lch2lab:
3420
3421 Convert color representation of selected images from Lch to
3422 Lab.
3423
3424 lch2rgb:
3425 illuminant={ 0=D50 | 1=D65 } |
3426 (no arg)
3427
3428 Convert color representation of selected images from Lch to
3429 RGB.
3430
3431 Default value: 'illuminant=1'.
3432
3433 lch82rgb:
3434 illuminant={ 0=D50 | 1=D65 } |
3435 (no arg)
3436
3437 Convert color representation of selected images from Lch8 to
3438 RGB.
3439
3440 Default value: 'illuminant=1'.
3441
3442 luminance:
3443
3444 Compute luminance of selected sRGB images.
3445
3446 lightness:
3447
3448 Compute lightness of selected sRGB images.
3449
3450 lut_rainbow:
3451
3452 Input a 256-entries RGB colormap of rainbow colors.
3453
3454 lut_contrast:
3455 _nb_colors>1,_min_rgb_value
3456
3457 Generate a RGB colormap where consecutive colors have high con‐
3458 trast.
3459 This function performs a specific score maximization to gener‐
3460 ate the result, so
3461 it may take some time when 'nb_colors' is high.
3462
3463 Default values: 'nb_colors=256' and 'min_rgb_value=64'.
3464
3465 mix_rgb:
3466 a11,a12,a13,a21,a22,a23,a31,a32,a33
3467
3468 Apply 3x3 specified matrix to RGB colors of selected images.
3469
3470 Default values: 'a11=1', 'a12=a13=a21=0', 'a22=1',
3471 'a23=a31=a32=0' and 'a33=1'.
3472
3473 pseudogray:
3474 _max_increment>=0,_JND_threshold>=0,_bits_depth>0
3475
3476 Generate pseudogray colormap with specified increment and per‐
3477 ceptual threshold.
3478 If 'JND_threshold' is 0, no perceptual constraints are applied.
3479
3480 Default values: 'max_increment=5', 'JND_threshold=2.3' and
3481 'bits_depth=8'.
3482
3483 replace_color:
3484 tolerance[%]>=0,smoothness[%]>=0,src1,src2,...,dest1,dest2,...
3485
3486 Replace pixels from/to specified colors in selected images.
3487
3488 retinex:
3489 _value_offset>0,_colorspace={ hsi | hsv | lab | lrgb | rgb |
3490 ycbcr },
3491 0<=_min_cut<=100,0<=_max_cut<=100,_sigma_low>0,_sigma_mid>0,_sigma_high>0
3492
3493 Apply multi-scale retinex algorithm on selected images to
3494 improve color consistency.
3495 (as described in the page
3496 http://www.ipol.im/pub/art/2014/107/).
3497
3498 Default values: 'offset=1', 'colorspace=hsv', 'min_cut=1',
3499 'max_cut=1', 'sigma_low=15',
3500 'sigma_mid=80' and 'sigma_high=250'.
3501
3502 rgb2bayer:
3503 _start_pattern=0,_color_grid=0
3504
3505 Transform selected color images to RGB-Bayer sampled images.
3506
3507 Default values: 'start_pattern=0' and 'color_grid=0'.
3508
3509 rgb2cmy:
3510
3511 Convert color representation of selected images from RGB to
3512 CMY.
3513
3514 rgb2cmyk:
3515
3516 Convert color representation of selected images from RGB to
3517 CMYK.
3518
3519 rgb2hcy:
3520
3521 Convert color representation of selected images from RGB to
3522 HCY.
3523
3524 rgb2hsi:
3525
3526 Convert color representation of selected images from RGB to
3527 HSI.
3528
3529 rgb2hsi8:
3530
3531 Convert color representation of selected images from RGB to
3532 HSI8.
3533
3534 rgb2hsl:
3535
3536 Convert color representation of selected images from RGB to
3537 HSL.
3538
3539 rgb2hsl8:
3540
3541 Convert color representation of selected images from RGB to
3542 HSL8.
3543
3544 rgb2hsv:
3545
3546 Convert color representation of selected images from RGB to
3547 HSV.
3548
3549 rgb2hsv8:
3550
3551 Convert color representation of selected images from RGB to
3552 HSV8.
3553
3554 rgb2int:
3555
3556 Convert color representation of selected images from RGB to
3557 INT24 scalars.
3558
3559 rgb2lab:
3560 illuminant={ 0=D50 | 1=D65 } |
3561 (no arg)
3562
3563 Convert color representation of selected images from RGB to
3564 Lab.
3565
3566 Default value: 'illuminant=1'.
3567
3568 rgb2lab8:
3569 illuminant={ 0=D50 | 1=D65 } |
3570 (no arg)
3571
3572 Convert color representation of selected images from RGB to
3573 Lab8.
3574
3575 Default value: 'illuminant=1'.
3576
3577 rgb2lch:
3578 illuminant={ 0=D50 | 1=D65 } |
3579 (no arg)
3580
3581 Convert color representation of selected images from RGB to
3582 Lch.
3583
3584 Default value: 'illuminant=1'.
3585
3586 rgb2lch8:
3587 illuminant={ 0=D50 | 1=D65 } |
3588 (no arg)
3589
3590 Convert color representation of selected images from RGB to
3591 Lch8.
3592
3593 Default value: 'illuminant=1'.
3594
3595 rgb2luv:
3596
3597 Convert color representation of selected images from RGB to
3598 LUV.
3599
3600 rgb2ryb:
3601
3602 Convert color representation of selected images from RGB to
3603 RYB.
3604
3605 rgb2srgb:
3606
3607 Convert color representation of selected images from linear RGB
3608 to sRGB.
3609
3610 rgb2xyz:
3611 illuminant={ 0=D50 | 1=D65 } |
3612 (no arg)
3613
3614 Convert color representation of selected images from RGB to
3615 XYZ.
3616
3617 Default value: 'illuminant=1'.
3618
3619 rgb2xyz8:
3620 illuminant={ 0=D50 | 1=D65 } |
3621 (no arg)
3622
3623 Convert color representation of selected images from RGB to
3624 XYZ8.
3625
3626 Default value: 'illuminant=1'.
3627
3628 rgb2yiq:
3629
3630 Convert color representation of selected images from RGB to
3631 YIQ.
3632
3633 rgb2yiq8:
3634
3635 Convert color representation of selected images from RGB to
3636 YIQ8.
3637
3638 rgb2ycbcr:
3639
3640 Convert color representation of selected images from RGB to
3641 YCbCr.
3642
3643 rgb2yuv:
3644
3645 Convert color representation of selected images from RGB to
3646 YUV.
3647
3648 rgb2yuv8:
3649
3650 Convert color representation of selected images from RGB to
3651 YUV8.
3652
3653 remove_opacity:
3654
3655 Remove opacity channel of selected images.
3656
3657 ryb2rgb:
3658
3659 Convert color representation of selected images from RYB to
3660 RGB.
3661
3662 select_color:
3663 tolerance[%]>=0,col1,...,colN
3664
3665 Select pixels with specified color in selected images.
3666
3667 sepia:
3668
3669 Apply sepia tones effect on selected images.
3670
3671 solarize:
3672
3673 Solarize selected images.
3674
3675 split_colors:
3676 _tolerance>=0,_max_nb_outputs>0,_min_area>0
3677
3678 Split selected images as several image containing a single
3679 color.
3680 One selected image can be split as at most 'max_nb_outputs'
3681 images.
3682 Output images are sorted by decreasing area of extracted color
3683 regions and have an additional
3684 alpha-channel.
3685
3686 Default values: 'tolerance=0', 'max_nb_outputs=256' and
3687 'min_area=8'.
3688
3689 split_opacity:
3690
3691 Split color and opacity parts of selected images.
3692
3693 srgb2lab:
3694 illuminant={ 0=D50 | 1=D65 } |
3695 (no arg)
3696
3697 Convert color representation of selected images from sRGB to
3698 Lab.
3699
3700 Default value: 'illuminant=1'.
3701
3702 srgb2lab8:
3703 illuminant={ 0=D50 | 1=D65 } |
3704 (no arg)
3705
3706 Convert color representation of selected images from sRGB to
3707 Lab8.
3708
3709 Default value: 'illuminant=1'.
3710
3711 srgb2rgb:
3712
3713 Convert color representation of selected images from sRGB to
3714 linear RGB.
3715
3716 to_a:
3717
3718 Force selected images to have an alpha channel.
3719
3720 to_color:
3721
3722 Force selected images to be in color mode (RGB or RGBA).
3723
3724 to_colormode:
3725 mode={ 0=adaptive | 1=G | 2=GA | 3=RGB | 4=RGBA }
3726
3727 Force selected images to be in a given color mode.
3728
3729 Default value: 'mode=0'.
3730
3731 to_gray:
3732
3733 Force selected images to be in GRAY mode.
3734
3735 to_graya:
3736
3737 Force selected images to be in GRAYA mode.
3738
3739 to_pseudogray:
3740 _max_step>=0,_is_perceptual_constraint={ 0 | 1 },_bits_depth>0
3741
3742 Convert selected scalar images ([0-255]-valued) to pseudo-gray
3743 color images.
3744
3745 Default values: 'max_step=5', 'is_perceptual_constraint=1' and
3746 'bits_depth=8'.
3747 The original pseudo-gray technique has been introduced by Rich
3748 Franzen [http://r0k.us/graphics/
3749 pseudoGrey.html].
3750 Extension of this technique to arbitrary increments for more
3751 tones, has been done by David
3752 Tschumperle.
3753
3754 to_rgb:
3755
3756 Force selected images to be in RGB mode.
3757
3758 to_rgba:
3759
3760 Force selected images to be in RGBA mode.
3761
3762 transfer_histogram:
3763 [reference_image],_nb_levels>0,_color_channels
3764
3765 Transfer histogram of the specified reference image to selected
3766 images.
3767 Argument 'color channels' is the same as with command
3768 'apply_channels'.
3769
3770 Default value: 'nb_levels=256' and 'color_channels=all'.
3771
3772 transfer_rgb:
3773 [target],_gamma>=0,_regularization>=0,_luminosity_con‐
3774 straints>=0,
3775 _rgb_resolution>=0,_is_constraints={ 0 | 1 }
3776
3777 Transfer colors from selected source images to selected refer‐
3778 ence image (given as argument).
3779 'gamma' determines the importance of color occurrences in the
3780 matching process (0=none to 1=huge).
3781 'regularization' determines the number of guided filter itera‐
3782 tions to remove quantization effects.
3783 'luminosity_constraints' tells if luminosity constraints must
3784 be applied on non-confident
3785 matched colors.
3786 'is_constraints' tells if additional hard color constraints
3787 must be set (opens an interactive window).
3788
3789 Default values: 'gamma=0.3','regularization=8', 'luminos‐
3790 ity_constraints=0.1',
3791 'rgb_resolution=64' and 'is_constraints=0'.
3792
3793 xyz2lab:
3794 illuminant={ 0=D50 | 1=D65 } |
3795 (no arg)
3796
3797 Convert color representation of selected images from XYZ to
3798 Lab.
3799
3800 Default value: 'illuminant=1'.
3801
3802 xyz2rgb:
3803 illuminant={ 0=D50 | 1=D65 } |
3804 (no arg)
3805
3806 Convert color representation of selected images from XYZ to
3807 RGB.
3808
3809 Default value: 'illuminant=1'.
3810
3811 xyz82rgb:
3812 illuminant={ 0=D50 | 1=D65 } |
3813 (no arg)
3814
3815 Convert color representation of selected images from XYZ8 to
3816 RGB.
3817
3818 Default value: 'illuminant=1'.
3819
3820 ycbcr2rgb:
3821
3822 Convert color representation of selected images from YCbCr to
3823 RGB.
3824
3825 yiq2rgb:
3826
3827 Convert color representation of selected images from YIQ to
3828 RGB.
3829
3830 yiq82rgb:
3831
3832 Convert color representation of selected images from YIQ8 to
3833 RGB.
3834
3835 yuv2rgb:
3836
3837 Convert color representation of selected images from YUV to
3838 RGB.
3839
3840 yuv82rgb:
3841
3842 Convert selected images from YUV8 to RGB color bases.
3843
3844 ** Geometry Manipulation:
3845
3846 append (+):
3847 [image],axis,_centering |
3848 axis,_centering
3849
3850 Append specified image to selected images, or all selected
3851 images together, along specified axis.
3852 (eq. to 'a').
3853 'axis' can be { x | y | z | c }.
3854 Usual 'centering' values are { 0=left-justified | 0.5=centered
3855 | 1=right-justified }.
3856
3857 Default value: 'centering=0'.
3858
3859 append_tiles:
3860 _M>=0,_N>=0,0<=_centering_x<=1,0<=_centering_y<=1
3861
3862 Append MxN selected tiles as new images.
3863 If 'N' is set to 0, number of rows is estimated automatically.
3864 If 'M' is set to 0, number of columns is estimated automati‐
3865 cally.
3866 If 'M' and 'N' are both set to '0', auto-mode is used.
3867 If 'M' or 'N' is set to 0, only a single image is produced.
3868 'centering_x' and 'centering_y' tells about the centering of
3869 tiles when they have different sizes.
3870
3871 Default values: 'M=0', 'N=0', 'centering_x=centering_y=0.5'.
3872
3873 apply_scales:
3874 "command",num‐
3875 ber_of_scales>0,_min_scale[%]>=0,_max_scale[%]>=0,_scale_gamma>0,
3876 _interpolation
3877
3878 Apply specified command on different scales of selected images.
3879 'interpolation' can be { 0=none | 1=nearest | 2=average |
3880 3=linear | 4=grid | 5=bicubic |
3881 6=lanczos }.
3882
3883 Default value: 'min_scale=25%', 'max_scale=100%' and 'interpo‐
3884 lation=3'.
3885
3886 autocrop (+):
3887 value1,value2,... |
3888 (no arg)
3889
3890 Autocrop selected images by specified vector-valued intensity.
3891 If no arguments are provided, cropping value is guessed.
3892
3893 autocrop_components:
3894 _threshold[%],_min_area[%]>=0,_is_high_connectivity={ 0 | 1
3895 },_output_type={
3896 0=crop | 1=segmentation | 2=coordinates }
3897
3898 Autocrop and extract connected components in selected images,
3899 according to a mask given as the
3900 last channel of
3901 each of the selected image (e.g. alpha-channel).
3902
3903 Default values: 'threshold=0%', 'min_area=0.1%', 'is_high_con‐
3904 nectivity=0' and 'output_type=1'.
3905
3906 autocrop_seq:
3907 value1,value2,... | auto
3908
3909 Autocrop selected images using the crop geometry of the last
3910 one by specified vector-valued
3911 intensity,
3912 or by automatic guessing the cropping value.
3913
3914 Default value: auto mode.
3915
3916 channels (+):
3917 { [image0] | c0[%] },_{ [image1] | c1[%] }
3918
3919 Keep only specified channels of selected images.
3920 Dirichlet boundary is used when specified channels are out of
3921 range.
3922
3923 columns (+):
3924 { [image0] | x0[%] },_{ [image1] | x1[%] }
3925
3926 Keep only specified columns of selected images.
3927 Dirichlet boundary is used when specified columns are out of
3928 range.
3929
3930 crop (+):
3931 x0[%],x1[%],_boundary_conditions |
3932 x0[%],y0[%],x1[%],y1[%],_boundary_conditions |
3933 x0[%],y0[%],z0[%],x1[%],y1[%],z1[%],_boundary_conditions |
3934 x0[%],y0[%],z0[%],c0[%],x1[%],y1[%],z1[%],c1[%],_boundary_con‐
3935 ditions
3936
3937 Crop selected images with specified region coordinates.
3938 (eq. to 'z').
3939 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
3940 2=periodic | 3=mirror }.
3941
3942 Default value: 'boundary_conditions=0'.
3943
3944 diagonal:
3945
3946 Transform selected vectors as diagonal matrices.
3947
3948 elevate:
3949 _depth,_is_plain={ 0 | 1 },_is_colored={ 0 | 1 }
3950
3951 Elevate selected 2D images into 3D volumes.
3952
3953 Default values: 'depth=64', 'is_plain=1' and 'is_colored=1'.
3954
3955 expand_x:
3956 size_x>=0,_boundary_conditions={ 0=dirichlet | 1=neumann |
3957 2=periodic |
3958 3=mirror }
3959
3960 Expand selected images along the x-axis.
3961
3962 Default value: 'boundary_conditions=1'.
3963
3964 expand_xy:
3965 size>=0,_boundary_conditions={ 0=dirichlet | 1=neumann |
3966 2=periodic | 3=mirror }
3967
3968 Expand selected images along the xy-axes.
3969
3970 Default value: 'boundary_conditions=1'.
3971
3972 expand_xyz:
3973 size>=0,_boundary_conditions={ 0=dirichlet | 1=neumann |
3974 2=periodic | 3=mirror }
3975
3976 Expand selected images along the xyz-axes.
3977
3978 Default value: 'boundary_conditions=1'.
3979
3980 expand_y:
3981 size_y>=0,_boundary_conditions={ 0=dirichlet | 1=neumann |
3982 2=periodic |
3983 3=mirror }
3984
3985 Expand selected images along the y-axis.
3986
3987 Default value: 'boundary_conditions=1'.
3988
3989 expand_z:
3990 size_z>=0,_boundary_conditions={ 0=dirichlet | 1=neumann |
3991 2=periodic |
3992 3=mirror }
3993
3994 Expand selected images along the z-axis.
3995
3996 Default value: 'boundary_conditions=1'.
3997
3998 extract_region:
3999 [label_image],_extract_xyz_coordinates={ 0 | 1
4000 },_label_1,...,_label_M
4001
4002 Extract all pixels of selected images whose corresponding label
4003 in '[label_image]' is equal to
4004 'label_m',
4005 and output them as M column images.
4006
4007 Default value: 'extract_xyz_coordinates=0'.
4008
4009 montage:
4010 "_layout_code",_montage_mode={ 0<=centering<=1 | 2<=scale+2<=3
4011 },_output_mode={
4012 0=single layer | 1=multiple layers },"_processing_command"
4013
4014 Create a single image montage from selected images, according
4015 to specified layout code :
4016 - 'X' to assemble all images using an automatically estimated
4017 layout.
4018 - 'H' to assemble all images horizontally.
4019 - 'V' to assemble all images vertically.
4020 - 'A' to assemble all images as an horizontal array.
4021 - 'B' to assemble all images as a vertical array.
4022 - 'Ha:b' to assemble two blocks 'a' and 'b' horizontally.
4023 - 'Va:b' to assemble two blocks 'a' and 'b' vertically.
4024 - 'Ra' to rotate a block 'a' by 90 deg. ('RRa' for 180 deg. and
4025 'RRRa' for 270 deg.).
4026 - 'Ma' to mirror a block 'a' along the X-axis ('MRRa' for the
4027 Y-axis).
4028 A block 'a' can be an image index (treated periodically) or a
4029 nested layout expression 'Hb:c',
4030 'Vb:c','Rb' or
4031 'Mb' itself.
4032 For example, layout code 'H0:V1:2' creates an image where image
4033 [0] is on the left, and images
4034 [1] and [2]
4035 vertically packed on the right.
4036
4037 Default values: 'layout_code=X', 'montage_mode=2', out‐
4038 put_mode='0' and 'processing_command=""'.
4039
4040 mirror (+):
4041 { x | y | z }...{ x | y | z }
4042
4043 Mirror selected images along specified axes.
4044
4045 permute (+):
4046 permutation_string
4047
4048 Permute selected image axes by specified permutation.
4049 'permutation' is a combination of the character set {x|y|z|c},
4050 e.g. 'xycz', 'cxyz', ...
4051
4052 resize (+):
4053 [image],_interpolation,_boundary_conditions,_ax,_ay,_az,_ac |
4054 {[image_w] | width>0[%]},_{[image_h] | height>0[%]},_{[image_d]
4055 | depth>0[%]},
4056 _{[image_s] | spectrum>0[%]},_interpolation,_boundary_condi‐
4057 tions,_ax,_ay,_az,_ac
4058
4059 Resize selected images with specified geometry.
4060 (eq. to 'r').
4061 'interpolation' can be { -1=none (memory content) | 0=none |
4062 1=nearest | 2=average | 3=linear |
4063 4=grid | 5=bicubic | 6=lanczos }.
4064 'boundary_conditions' has different meanings, according to the
4065 chosen 'interpolation' mode :
4066 . When 'interpolation=={ -1 | 1 | 2 | 4 }', 'boundary_condi‐
4067 tions' is meaningless.
4068 . When 'interpolation==0', 'boundary_conditions' can be {
4069 0=dirichlet | 1=neumann | 2=periodic |
4070 3=mirror }.
4071 . When 'interpolation=={ 3 | 5 | 6 }', 'boundary_conditions'
4072 can be { 0=none | 1=neumann }.
4073 'ax,ay,az,ac' set the centering along each axis when 'interpo‐
4074 lation=0 or 4'
4075 (set to '0' by default, must be defined in range [0,1]).
4076
4077 Default values: 'interpolation=1', 'boundary_conditions=0' and
4078 'ax=ay=az=ac=0'.
4079
4080 resize_mn:
4081 width[%]>=0,_height[%]>=0,_depth[%]>=0,_B_value,_C_value
4082
4083 Resize selected images with Mitchell-Netravali filter (cubic).
4084 For details about the method, see:
4085 https://de.wikipedia.org/wiki/Mitchell-Netravali-Filter
4086
4087 Default values: 'height=100%', 'depth=100%', 'B=0.3333' and
4088 'C=0.3333'.
4089
4090 resize_pow2:
4091 _interpolation,_boundary_conditions,_ax,_ay,_az,_ac
4092
4093 Resize selected images so that each dimension is a power of 2.
4094 'interpolation' can be { -1=none (memory content) | 0=none |
4095 1=nearest | 2=average | 3=linear |
4096 4=grid | 5=bicubic | 6=lanczos }.
4097 'boundary_conditions' has different meanings, according to the
4098 chosen 'interpolation' mode :
4099 . When 'interpolation=={ -1 | 1 | 2 | 4 }', 'boundary_condi‐
4100 tions' is meaningless.
4101 . When 'interpolation==0', 'boundary_conditions' can be {
4102 0=dirichlet | 1=neumann | 2=periodic |
4103 3=mirror }.
4104 . When 'interpolation=={ 3 | 5 | 6 }', 'boundary_conditions'
4105 can be { 0=none | 1=neumann }.
4106 'ax,ay,az,ac' set the centering along each axis when 'interpo‐
4107 lation=0'
4108 (set to '0' by default, must be defined in range [0,1]).
4109
4110 Default values: 'interpolation=0', 'boundary_conditions=0' and
4111 'ax=ay=az=ac=0'.
4112
4113 resize_ratio2d:
4114 width>0,height>0,_mode={ 0=inside | 1=outside | 2=padded
4115 },0=<_interpolation<=6
4116
4117 Resize selected images while preserving their aspect ratio.
4118 (eq. to 'rr2d').
4119
4120 Default values: 'mode=0' and 'interpolation=6'.
4121
4122 resize2dx:
4123 width[%]>0,_interpolation,_boundary_conditions,_ax,_ay,_az,_ac
4124
4125 Resize selected images along the x-axis, preserving 2D ratio.
4126 (eq. to 'r2dx').
4127 'interpolation' can be { -1=none (memory content) | 0=none |
4128 1=nearest | 2=average | 3=linear |
4129 4=grid | 5=bicubic | 6=lanczos }.
4130 'boundary_conditions' has different meanings, according to the
4131 chosen 'interpolation' mode :
4132 . When 'interpolation=={ -1 | 1 | 2 | 4 }', 'boundary_condi‐
4133 tions' is meaningless.
4134 . When 'interpolation==0', 'boundary_conditions' can be {
4135 0=dirichlet | 1=neumann | 2=periodic |
4136 3=mirror }.
4137 . When 'interpolation=={ 3 | 5 | 6 }', 'boundary_conditions'
4138 can be { 0=none | 1=neumann }.
4139 'ax,ay,az,ac' set the centering along each axis when 'interpo‐
4140 lation=0'
4141 (set to '0' by default, must be defined in range [0,1]).
4142
4143 Default values: 'interpolation=3', 'boundary_conditions=0' and
4144 'ax=ay=az=ac=0'.
4145
4146 resize2dy:
4147 height[%]>=0,_interpolation,_boundary_condi‐
4148 tions,_ax,_ay,_az,_ac
4149
4150 Resize selected images along the y-axis, preserving 2D ratio.
4151 (eq. to 'r2dy').
4152 'interpolation' can be { -1=none (memory content) | 0=none |
4153 1=nearest | 2=average | 3=linear |
4154 4=grid | 5=bicubic | 6=lanczos }.
4155 'boundary_conditions' has different meanings, according to the
4156 chosen 'interpolation' mode :
4157 . When 'interpolation=={ -1 | 1 | 2 | 4 }', 'boundary_condi‐
4158 tions' is meaningless.
4159 . When 'interpolation==0', 'boundary_conditions' can be {
4160 0=dirichlet | 1=neumann | 2=periodic |
4161 3=mirror }.
4162 . When 'interpolation=={ 3 | 5 | 6 }', 'boundary_conditions'
4163 can be { 0=none | 1=neumann }.
4164 'ax,ay,az,ac' set the centering along each axis when 'interpo‐
4165 lation=0'
4166 (set to '0' by default, must be defined in range [0,1]).
4167
4168 Default values: 'interpolation=3', 'boundary_conditions=0' and
4169 'ax=ay=az=ac=0'.
4170
4171 resize3dx:
4172 width[%]>0,_interpolation,_boundary_conditions,_ax,_ay,_az,_ac
4173
4174 Resize selected images along the x-axis, preserving 3D ratio.
4175 (eq. to 'r3dx').
4176 'interpolation' can be { -1=none (memory content) | 0=none |
4177 1=nearest | 2=average | 3=linear |
4178 4=grid | 5=bicubic | 6=lanczos }.
4179 'boundary_conditions' has different meanings, according to the
4180 chosen 'interpolation' mode :
4181 . When 'interpolation=={ -1 | 1 | 2 | 4 }', 'boundary_condi‐
4182 tions' is meaningless.
4183 . When 'interpolation==0', 'boundary_conditions' can be {
4184 0=dirichlet | 1=neumann | 2=periodic |
4185 3=mirror }.
4186 . When 'interpolation=={ 3 | 5 | 6 }', 'boundary_conditions'
4187 can be { 0=none | 1=neumann }.
4188 'ax,ay,az,ac' set the centering along each axis when 'interpo‐
4189 lation=0'
4190 (set to '0' by default, must be defined in range [0,1]).
4191
4192 Default values: 'interpolation=3', 'boundary_conditions=0' and
4193 'ax=ay=az=ac=0'.
4194
4195 resize3dy:
4196 height[%]>0,_interpolation,_boundary_conditions,_ax,_ay,_az,_ac
4197
4198 Resize selected images along the y-axis, preserving 3D ratio.
4199 (eq. to 'r3dy').
4200 'interpolation' can be { -1=none (memory content) | 0=none |
4201 1=nearest | 2=average | 3=linear |
4202 4=grid | 5=bicubic | 6=lanczos }.
4203 'boundary_conditions' has different meanings, according to the
4204 chosen 'interpolation' mode :
4205 . When 'interpolation=={ -1 | 1 | 2 | 4 }', 'boundary_condi‐
4206 tions' is meaningless.
4207 . When 'interpolation==0', 'boundary_conditions' can be {
4208 0=dirichlet | 1=neumann | 2=periodic |
4209 3=mirror }.
4210 . When 'interpolation=={ 3 | 5 | 6 }', 'boundary_conditions'
4211 can be { 0=none | 1=neumann }.
4212 'ax,ay,az,ac' set the centering along each axis when 'interpo‐
4213 lation=0'
4214 (set to '0' by default, must be defined in range [0,1]).
4215
4216 Default values: 'interpolation=3', 'boundary_conditions=0' and
4217 'ax=ay=az=ac=0'.
4218
4219 resize3dz:
4220 depth[%]>0,_interpolation,_boundary_conditions,_ax,_ay,_az,_ac
4221
4222 Resize selected images along the z-axis, preserving 3D ratio.
4223 (eq. to 'r3dz').
4224 'interpolation' can be { -1=none (memory content) | 0=none |
4225 1=nearest | 2=average | 3=linear |
4226 4=grid | 5=bicubic | 6=lanczos }.
4227 'boundary_conditions' has different meanings, according to the
4228 chosen 'interpolation' mode :
4229 . When 'interpolation=={ -1 | 1 | 2 | 4 }', 'boundary_condi‐
4230 tions' is meaningless.
4231 . When 'interpolation==0', 'boundary_conditions' can be {
4232 0=dirichlet | 1=neumann | 2=periodic |
4233 3=mirror }.
4234 . When 'interpolation=={ 3 | 5 | 6 }', 'boundary_conditions'
4235 can be { 0=none | 1=neumann }.
4236 'ax,ay,az,ac' set the centering along each axis when 'interpo‐
4237 lation=0'
4238 (set to '0' by default, must be defined in range [0,1]).
4239
4240 Default values: 'interpolation=3', 'boundary_conditions=0' and
4241 'ax=ay=az=ac=0'.
4242
4243 rotate (+):
4244 angle,_interpolation,_boundary_conditions,_center_x[%],_cen‐
4245 ter_y[%] |
4246 u,v,w,angle,interpolation,boundary_conditions,_cen‐
4247 ter_x[%],_center_y[%],
4248 _center_z[%]
4249
4250 Rotate selected images with specified angle (in deg.), and
4251 optionally 3D axis (u,v,w).
4252 'interpolation' can be { 0=none | 1=linear | 2=bicubic }.
4253 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
4254 2=periodic | 3=mirror }.
4255 When a rotation center (cx,cy,_cz) is specified, the size of
4256 the image is preserved.
4257
4258 Default values: 'interpolation=1', 'boundary_conditions=0' and
4259 'center_x=center_y=(undefined)'.
4260
4261 rotate_tileable:
4262 angle,_max_size_factor>=0
4263
4264 Rotate selected images by specified angle and make them
4265 tileable.
4266 If resulting size of an image is too big, the image is replaced
4267 by a 1x1 image.
4268
4269 Default values: 'max_size_factor=8'.
4270
4271 rows (+):
4272 { [image0] | y0[%] },_{ [image1] | y1[%] }
4273
4274 Keep only specified rows of selected images.
4275 Dirichlet boundary conditions are used when specified rows are
4276 out of range.
4277
4278 scale2x:
4279
4280 Resize selected images using the Scale2x algorithm.
4281
4282 scale3x:
4283
4284 Resize selected images using the Scale3x algorithm.
4285
4286 scale_dcci2x:
4287 _edge_threshold>=0,_exponent>0,_extend_1px={ 0=false | 1=true }
4288
4289 Double image size using directional cubic convolution interpo‐
4290 lation,
4291 as described in https://en.wikipedia.org/wiki/Direc‐
4292 tional_Cubic_Convolution_Interpolation.
4293
4294 Default values: 'edge_threshold=1.15', 'exponent=5' and
4295 'extend_1px=0'.
4296
4297 seamcarve:
4298 _width[%]>=0,_height[%]>=0,_is_priority_channel={ 0 | 1
4299 },_is_antialiasing={ 0 |
4300 1 },_maximum_seams[%]>=0
4301
4302 Resize selected images with specified 2D geometry, using the
4303 seam-carving algorithm.
4304
4305 Default values: 'height=100%', 'is_priority_channel=0',
4306 'is_antialiasing=1' and
4307 'maximum_seams=25%'.
4308
4309 shift (+):
4310 vx[%],_vy[%],_vz[%],_vc[%],_boundary_conditions,_interpola‐
4311 tion={
4312 0=nearest_neighbor | 1=linear }
4313
4314 Shift selected images by specified displacement vector.
4315 Displacement vector can be non-integer in which case linear
4316 interpolation should be chosen.
4317 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
4318 2=periodic | 3=mirror }.
4319
4320 Default value: 'boundary_conditions=0' and 'interpolation=0'.
4321
4322 shrink_x:
4323 size_x>=0
4324
4325 Shrink selected images along the x-axis.
4326
4327 shrink_xy:
4328 size>=0
4329
4330 Shrink selected images along the xy-axes.
4331
4332 shrink_xyz:
4333 size>=0
4334
4335 Shrink selected images along the xyz-axes.
4336
4337 shrink_y:
4338 size_y>=0
4339
4340 Shrink selected images along the y-axis.
4341
4342 shrink_z:
4343 size_z>=0
4344
4345 Shrink selected images along the z-axis.
4346
4347 slices (+):
4348 { [image0] | z0[%] },_{ [image1] | z1[%] }
4349
4350 Keep only specified slices of selected images.
4351 Dirichlet boundary conditions are used when specified slices
4352 are out of range.
4353
4354 sort (+):
4355 _ordering={ + | - },_axis={ x | y | z | c }
4356
4357 Sort pixel values of selected images.
4358 If 'axis' is specified, the sorting is done according to the
4359 data of the first column/row/slice/channel
4360 of selected images.
4361
4362 Default values: 'ordering=+' and 'axis=(undefined)'.
4363
4364 split (+):
4365 { x | y | z | c }...{ x | y | z | c },_split_mode |
4366 keep_splitting_values={ + | - },_{ x | y | z | c }...{ x | y |
4367 z | c },value1,
4368 _value2,... |
4369 (no arg)
4370
4371 Split selected images along specified axes, or regarding to a
4372 sequence of scalar values
4373 (optionally along specified axes too).
4374 (eq. to 's').
4375 'split_mode' can be { 0=split according to constant values |
4376 >0=split in N parts | <0=split in
4377 parts of size -N }.
4378
4379 Default value: 'split_mode=-1'.
4380
4381 split_tiles:
4382 M!=0,_N!=0,_is_homogeneous={ 0 | 1 }
4383
4384 Split selected images as a MxN array of tiles.
4385 If M or N is negative, it stands for the tile size instead.
4386
4387 Default values: 'N=M' and 'is_homogeneous=0'.
4388
4389 undistort:
4390 -1<=_amplitude<=1,_aspect_ratio,_zoom,_center_x[%],_cen‐
4391 ter_y[%],
4392 _boundary_conditions
4393
4394 Correct barrel/pincushion distortions occurring with wide-angle
4395 lens.
4396 References:
4397 [1] Zhang Z. (1999). Flexible camera calibration by viewing a
4398 plane from unknown orientation.
4399 [2] Andrew W. Fitzgibbon (2001). Simultaneous linear estimation
4400 of multiple view geometry and
4401 lens distortion.
4402 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
4403 2=periodic | 3=mirror }.
4404
4405 Default values: 'amplitude=0.25', 'aspect_ratio=0', 'zoom=0',
4406 'center_x=center_y=50%' and
4407 'boundary_conditions=0'.
4408
4409 unroll (+):
4410 _axis={ x | y | z | c }
4411
4412 Unroll selected images along specified axis.
4413 (eq. to 'y').
4414
4415 Default value: 'axis=y'.
4416
4417 upscale_smart:
4418 width[%],_height[%],_depth,_smoothness>=0,_anisot‐
4419 ropy=[0,1],sharpening>=0
4420
4421 Upscale selected images with an edge-preserving algorithm.
4422
4423 Default values: 'height=100%', 'depth=100%', 'smoothness=2',
4424 'anisotropy=0.4' and
4425 'sharpening=10'.
4426
4427 warp (+):
4428 [warping_field],_mode,_interpolation,_boundary_condi‐
4429 tions,_nb_frames>0
4430
4431 Warp selected images with specified displacement field.
4432 'mode' can be { 0=backward-absolute | 1=backward-relative |
4433 2=forward-absolute |
4434 3=forward-relative }.
4435 'interpolation' can be { 0=nearest-neighbor | 1=linear |
4436 2=cubic }.
4437 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
4438 2=periodic | 3=mirror }.
4439
4440 Default values: 'mode=0', 'interpolation=1', 'boundary_condi‐
4441 tions=1' and 'nb_frames=1'.
4442
4443 warp_patch:
4444 [warp‐
4445 ing_field],patch_width>=1,_patch_height>=1,_patch_depth>=1,_std_fac‐
4446 tor>0,
4447 _boundary_conditions.
4448
4449 Patch-warp selected images, with specified 2D or 3D displace‐
4450 ment field (in backward-absolute mode).
4451 Argument 'std_factor' sets the std of the gaussian weights for
4452 the patch overlap,
4453 equal to 'std = std_factor*patch_size'.
4454 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
4455 2=periodic | 3=mirror }.
4456
4457 Default values: 'std_factor=0.3' and 'boundary_conditions=3'.
4458
4459 ** Filtering:
4460
4461 bandpass:
4462 _min_freq[%],_max_freq[%]
4463
4464 Apply bandpass filter to selected images.
4465
4466 Default values: 'min_freq=0' and 'max_freq=20%'.
4467
4468 bilateral (+):
4469 [guide],std_deviation_s[%]>=0,std_deviation_r[%]>=0,_sam‐
4470 pling_s>=0,
4471 _sampling_r>=0 |
4472 std_deviation_s[%]>=0,std_deviation_r[%]>=0,_sam‐
4473 pling_s>=0,_sampling_r>=0
4474
4475 Blur selected images by anisotropic (eventually joint/cross)
4476 bilateral filtering.
4477 If a guide image is provided, it is used for drive the smooth‐
4478 ing filter.
4479 A guide image must be of the same xyz-size as the selected
4480 images.
4481 Set 'sampling' arguments to '0' for automatic adjustment.
4482
4483 blur (+):
4484 std_deviation>=0[%],_boundary_conditions,_kernel |
4485 axes,std_deviation>=0[%],_boundary_conditions,_kernel
4486
4487 Blur selected images by a quasi-gaussian or gaussian filter
4488 (recursive implementation).
4489 (eq. to 'b').
4490 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
4491 'kernel' can be { 0=quasi-gaussian (faster) | 1=gaussian }.
4492 When specified, argument 'axes' is a sequence of { x | y | z |
4493 c }.
4494 Specifying one axis multiple times apply also the blur multiple
4495 times.
4496
4497 Default values: 'boundary_conditions=1' and 'kernel=0'.
4498
4499 blur_angular:
4500 amplitude[%],_center_x[%],_center_y[%]
4501
4502 Apply angular blur on selected images.
4503
4504 Default values: 'center_x=center_y=50%'.
4505
4506 blur_bloom:
4507 _amplitude>=0,_ratio>=0,_nb_iter>=0,_blend_operator={ + | max |
4508 min },_kernel={
4509 0=quasi-gaussian (faster) | 1=gaussian | 2=box | 3=triangle |
4510 4=quadratic },
4511 _normalize_scales={ 0 | 1 },_axes
4512
4513 Apply a bloom filter that blend multiple blur filters of dif‐
4514 ferent radii,
4515 resulting in a larger but sharper glare than a simple blur.
4516 When specified, argument 'axes' is a sequence of { x | y | z |
4517 c }.
4518 Specifying one axis multiple times apply also the blur multiple
4519 times.
4520 Reference: Masaki Kawase, "Practical Implementation of High
4521 Dynamic Range Rendering", GDC 2004.
4522
4523 Default values: 'amplitude=1', 'ratio=2', 'nb_iter=5',
4524 'blend_operator=+', 'kernel=0',
4525 'normalize_scales=0' and 'axes=(all)'
4526
4527 blur_linear:
4528 amplitude1[%],_amplitude2[%],_angle,_boundary_conditions={
4529 0=dirichlet |
4530 1=neumann }
4531
4532 Apply linear blur on selected images, with specified angle and
4533 amplitudes.
4534
4535 Default values: 'amplitude2=0', 'angle=0' and 'boundary_condi‐
4536 tions=1'.
4537
4538 blur_radial:
4539 amplitude[%],_center_x[%],_center_y[%]
4540
4541 Apply radial blur on selected images.
4542
4543 Default values: 'center_x=center_y=50%'.
4544
4545 blur_selective:
4546 sigma>=0,_edges>0,_nb_scales>0
4547
4548 Blur selected images using selective gaussian scales.
4549
4550 Default values: 'sigma=5', 'edges=0.5' and 'nb_scales=5'.
4551
4552 blur_x:
4553 amplitude[%]>=0,_boundary_conditions={ 0=dirichlet | 1=neumann
4554 }
4555
4556 Blur selected images along the x-axis.
4557
4558 Default value: 'boundary_conditions=1'.
4559
4560 blur_xy:
4561 amplitude_x[%],amplitude_y[%],_boundary_conditions={ 0=dirich‐
4562 let | 1=neumann }
4563
4564 Blur selected images along the X and Y axes.
4565
4566 Default value: 'boundary_conditions=1'.
4567
4568 blur_xyz:
4569 amplitude_x[%],amplitude_y[%],amplitude_z,_boundary_condi‐
4570 tions={ 0=dirichlet |
4571 1=neumann }
4572
4573 Blur selected images along the X, Y and Z axes.
4574
4575 Default value: 'boundary_conditions=1'.
4576
4577 blur_y:
4578 amplitude[%]>=0,_boundary_conditions={ 0=dirichlet | 1=neumann
4579 }
4580
4581 Blur selected images along the y-axis.
4582
4583 Default value: 'boundary_conditions=1'.
4584
4585 blur_z:
4586 amplitude[%]>=0,_boundary_conditions={ 0=dirichlet | 1=neumann
4587 }
4588
4589 Blur selected images along the z-axis.
4590
4591 Default value: 'boundary_conditions=1'.
4592
4593 boxfilter (+):
4594 size>=0[%],_order,_boundary_conditions,_nb_iter>=0 |
4595 axes,size>=0[%],_order,_boundary_conditions,_nb_iter>=0
4596
4597 Blur selected images by a box filter of specified size (fast
4598 recursive implementation).
4599 'order' can be { 0=smooth | 1=1st-derivative | 2=2nd-derivative
4600 }.
4601 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
4602 When specified, argument 'axes' is a sequence of { x | y | z |
4603 c }.
4604 Specifying one axis multiple times apply also the blur multiple
4605 times.
4606
4607 Default values: 'order=0', 'boundary_conditions=1' and
4608 'nb_iter=1'.
4609
4610 bump2normal:
4611
4612 Convert selected bumpmaps to normalmaps.
4613
4614 compose_freq:
4615
4616 Compose selected low and high frequency parts into new images.
4617
4618 convolve (+):
4619 [mask],_boundary_conditions,_is_normalized={ 0 | 1 },_chan‐
4620 nel_mode,_xcenter,
4621 _ycenter,_zcen‐
4622 ter,_xstart,_ystart,_zstart,_xend,_yend,_zend,_xstride,_ystride,
4623 _zstride,_xdilation,_ydilation,_zdilation
4624
4625 Convolve selected images by specified mask.
4626 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
4627 2=periodic | 3=mirror }.
4628 'channel_mode' can be { 0=sum input channels | 1=one-for-one |
4629 2=expand }.
4630
4631 Default values: 'boundary_conditions=1', 'is_normalized=0',
4632 'sum_input_channels=0',
4633 'xcenter=ycenter=zcenter=-1' (-1=centered),
4634 'xstart=ystart=zstart=0', 'xend=yend=zend=-1'
4635 (-1=max coordinates), 'xstride=ystride=zstride=1' and 'xdila‐
4636 tion=ydilation=zdilation=1'.
4637
4638 convolve_fft:
4639 [mask]
4640
4641 Convolve selected images with specified mask, in the fourier
4642 domain.
4643
4644 correlate (+):
4645 [mask],_boundary_conditions,_is_normalized={ 0 | 1 },_chan‐
4646 nel_mode,_xcenter,
4647 _ycenter,_zcen‐
4648 ter,_xstart,_ystart,_zstart,_xend,_yend,_zend,_xstride,_ystride,
4649 _zstride,_xdilation,_ydilation,_zdilation
4650
4651 Correlate selected images by specified mask.
4652 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
4653 2=periodic | 3=mirror }.
4654 'channel_mode' can be { 0=sum input channels | 1=one-for-one |
4655 2=expand }.
4656
4657 Default values: 'boundary_conditions=1', 'is_normalized=0',
4658 'sum_input_channels=0',
4659 'xcenter=ycenter=zcenter=-1' (-1=centered),
4660 'xstart=ystart=zstart=0', 'xend=yend=zend=-1'
4661 (-1=max coordinates), 'xstride=ystride=zstride=1' and 'xdila‐
4662 tion=ydilation=zdilation=1'.
4663
4664 cross_correlation:
4665 [mask]
4666
4667 Compute cross-correlation of selected images with specified
4668 mask.
4669
4670 curvature:
4671
4672 Compute isophote curvatures on selected images.
4673
4674 dct:
4675 _{ x | y | z }...{ x | y | z } |
4676 (no arg)
4677
4678 Compute the discrete cosine transform of selected images,
4679 optionally along the specified axes only.
4680
4681 Default values: (no arg)
4682
4683 deblur:
4684 amplitude[%]>=0,_nb_iter>=0,_dt>=0,_regul>=0,_regul_type={
4685 0=Tikhonov |
4686 1=meancurv. | 2=TV }
4687
4688 Deblur image using a regularized Jansson-Van Cittert algorithm.
4689
4690 Default values: 'nb_iter=10', 'dt=20', 'regul=0.7' and
4691 'regul_type=1'.
4692
4693 deblur_goldmeinel:
4694 sigma>=0,_nb_iter>=0,_acceleration>=0,_kernel_type={ 0=quasi-
4695 gaussian (faster) |
4696 1=gaussian }.
4697
4698 Deblur selected images using Gold-Meinel algorithm
4699
4700 Default values: 'nb_iter=8', 'acceleration=1' and 'ker‐
4701 nel_type=1'.
4702
4703 deblur_richardsonlucy:
4704 sigma>=0, nb_iter>=0, _kernel_type={ 0=quasi-gaussian (faster)
4705 | 1=gaussian }.
4706
4707 Deblur selected images using Richardson-Lucy algorithm.
4708
4709 Default values: 'nb_iter=50' and 'kernel_type=1'.
4710
4711 deconvolve_fft:
4712 [kernel],_regularization>=0
4713
4714 Deconvolve selected images by specified mask in the fourier
4715 space.
4716
4717 Default value: 'regularization>=0'.
4718
4719 deinterlace:
4720 _method={ 0 | 1 }
4721
4722 Deinterlace selected images ('method' can be { 0=standard or
4723 1=motion-compensated }).
4724
4725 Default value: 'method=0'.
4726
4727 denoise (+):
4728 [guide],std_deviation_s[%]>=0,_std_devia‐
4729 tion_r[%]>=0,_patch_size>0,
4730 _lookup_size>0,_smoothness,_fast_approx={ 0 | 1 } |
4731 std_deviation_s[%]>=0,_std_devia‐
4732 tion_r[%]>=0,_patch_size>0,_lookup_size>0,
4733 _smoothness,_fast_approx={ 0 | 1 }
4734
4735 Denoise selected images by non-local patch averaging.
4736
4737 Default values: 'std_deviation_p=10', 'patch_size=5',
4738 'lookup_size=6' and 'smoothness=1'.
4739
4740 denoise_haar:
4741 _threshold>=0,_nb_scales>=0,_cycle_spinning>0
4742
4743 Denoise selected images using haar-wavelet thresholding with
4744 cycle spinning.
4745 Set 'nb_scales==0' to automatically determine the optimal num‐
4746 ber of scales.
4747
4748 Default values: 'threshold=1.4', 'nb_scale=0' and 'cycle_spin‐
4749 ning=10'.
4750
4751 denoise_patchpca:
4752 _strength>=0,_patch_size>0,_lookup_size>0,_spatial_sampling>0
4753
4754 Denoise selected images using the patch-pca algorithm.
4755
4756 Default values: 'patch_size=7', 'lookup_size=11', 'details=1.8'
4757 and 'spatial_sampling=5'.
4758
4759 deriche (+):
4760 std_deviation>=0[%],order={ 0 | 1 | 2 },axis={ x | y | z | c },
4761 _boundary_conditions
4762
4763 Apply Deriche recursive filter on selected images, along speci‐
4764 fied axis and with
4765 specified standard deviation, order and boundary conditions.
4766 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
4767
4768 Default value: 'boundary_conditions=1'.
4769
4770 dilate (+):
4771 size>=0 |
4772 size_x>=0,size_y>=0,size_z>=0 |
4773 [kernel],_boundary_conditions,_is_real={ 0=binary-mode |
4774 1=real-mode }
4775
4776 Dilate selected images by a rectangular or the specified struc‐
4777 turing element.
4778 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
4779
4780 Default values: 'size_z=1', 'boundary_conditions=1' and
4781 'is_real=0'.
4782
4783 dilate_circ:
4784 _size>=0,_boundary_conditions,_is_normalized={ 0 | 1 }
4785
4786 Apply circular dilation of selected images by specified size.
4787
4788 Default values: 'boundary_conditions=1' and 'is_normalized=0'.
4789
4790 dilate_oct:
4791 _size>=0,_boundary_conditions,_is_normalized={ 0 | 1 }
4792
4793 Apply octagonal dilation of selected images by specified size.
4794
4795 Default values: 'boundary_conditions=1' and 'is_normalized=0'.
4796
4797 dilate_threshold:
4798 size_x>=1,size_y>=1,size_z>=1,_threshold>=0,_boundary_condi‐
4799 tions
4800
4801 Dilate selected images in the (X,Y,Z,I) space.
4802 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
4803
4804 Default values: 'size_y=size_x', 'size_z=1', 'threshold=255'
4805 and 'boundary_conditions=1'.
4806
4807 divergence:
4808
4809 Compute divergence of selected vector fields.
4810
4811 dog:
4812 _sigma1>=0[%],_sigma2>=0[%]
4813
4814 Compute difference of gaussian on selected images.
4815
4816 Default values: 'sigma1=2%' and 'sigma2=3%'.
4817
4818 diffusiontensors:
4819 _sharpness>=0,0<=_anisotropy<=1,_alpha[%],_sigma[%],is_sqrt={ 0
4820 | 1 }
4821
4822 Compute the diffusion tensors of selected images for edge-pre‐
4823 serving smoothing algorithms.
4824
4825 Default values: 'sharpness=0.7', 'anisotropy=0.3', 'alpha=0.6',
4826 'sigma=1.1' and 'is_sqrt=0'.
4827
4828 edges:
4829 _threshold[%]>=0
4830
4831 Estimate contours of selected images.
4832
4833 Default value: 'edges=15%'
4834
4835 erode (+):
4836 size>=0 |
4837 size_x>=0,size_y>=0,_size_z>=0 |
4838 [kernel],_boundary_conditions,_is_real={ 0=binary-mode |
4839 1=real-mode }
4840
4841 Erode selected images by a rectangular or the specified struc‐
4842 turing element.
4843 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
4844
4845 Default values: 'size_z=1', 'boundary_conditions=1' and
4846 'is_real=0'.
4847
4848 erode_circ:
4849 _size>=0,_boundary_conditions,_is_normalized={ 0 | 1 }
4850
4851 Apply circular erosion of selected images by specified size.
4852
4853 Default values: 'boundary_conditions=1' and 'is_normalized=0'.
4854
4855 erode_oct:
4856 _size>=0,_boundary_conditions,_is_normalized={ 0 | 1 }
4857
4858 Apply octagonal erosion of selected images by specified size.
4859
4860 Default values: 'boundary_conditions=1' and 'is_normalized=0'.
4861
4862 erode_threshold:
4863 size_x>=1,size_y>=1,size_z>=1,_threshold>=0,_boundary_condi‐
4864 tions
4865
4866 Erode selected images in the (X,Y,Z,I) space.
4867 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
4868
4869 Default values: 'size_y=size_x', 'size_z=1', 'threshold=255'
4870 and 'boundary_conditions=1'.
4871
4872 fft (+):
4873 _{ x | y | z }...{ x | y | z }
4874
4875 Compute the direct fourier transform (real and imaginary parts)
4876 of selected images,
4877 optionally along the specified axes only.
4878
4879 gradient (+):
4880 { x | y | z }...{ x | y | z },_scheme |
4881 (no arg)
4882
4883 Compute the gradient components (first derivatives) of selected
4884 images.
4885 (eq. to 'g').
4886 'scheme' can be { -1=backward | 0=centered | 1=forward |
4887 2=sobel | 3=rotation-invariant
4888 (default) | 4=deriche | 5=vanvliet }.
4889 (no arg) compute all significant 2D/3D components.
4890
4891 Default value: 'scheme=3'.
4892
4893 gradient_norm:
4894
4895 Compute gradient norm of selected images.
4896
4897 gradient_orientation:
4898 _dimension={1,2,3}
4899
4900 Compute N-d gradient orientation of selected images.
4901
4902 Default value: 'dimension=3'.
4903
4904 guided (+):
4905 [guide],radius[%]>=0,regularization[%]>=0 |
4906 radius[%]>=0,regularization[%]>=0
4907
4908 Blur selected images by guided image filtering.
4909 If a guide image is provided, it is used to drive the smoothing
4910 process.
4911 A guide image must be of the same xyz-size as the selected
4912 images.
4913 This command implements the filtering algorithm described in:
4914 He, Kaiming; Sun, Jian; Tang, Xiaoou, "Guided Image Filtering,"
4915 Pattern Analysis and Machine
4916 Intelligence,
4917 IEEE Transactions on , vol.35, no.6, pp.1397,1409, June 2013
4918
4919 haar:
4920 scale>0
4921
4922 Compute the direct haar multiscale wavelet transform of
4923 selected images.
4924
4925 heat_flow:
4926 _nb_iter>=0,_dt,_keep_sequence={ 0 | 1 }
4927
4928 Apply iterations of the heat flow on selected images.
4929
4930 Default values: 'nb_iter=10', 'dt=30' and 'keep_sequence=0'.
4931
4932 hessian (+):
4933 { xx | xy | xz | yy | yz | zz }...{ xx | xy | xz | yy | yz | zz
4934 } |
4935 (no arg)
4936
4937 Compute the hessian components (second derivatives) of selected
4938 images.
4939 (no arg) compute all significant components.
4940
4941 idct:
4942 _{ x | y | z }...{ x | y | z } |
4943 (no arg)
4944
4945 Compute the inverse discrete cosine transform of selected
4946 images,
4947 optionally along the specified axes only.
4948
4949 Default values: (no arg)
4950
4951 iee:
4952
4953 Compute gradient-orthogonal-directed 2nd derivative of
4954 image(s).
4955
4956 ifft (+):
4957 _{ x | y | z }...{ x | y | z }
4958
4959 Compute the inverse fourier transform (real and imaginary
4960 parts) of selected images.
4961 optionally along the specified axes only.
4962
4963 ihaar:
4964 scale>0
4965
4966 Compute the inverse haar multiscale wavelet transform of
4967 selected images.
4968
4969 ilaplacian:
4970 { nb_iterations>0 | 0 },_time_step>0,_[initial_estimate]
4971
4972 Invert selected Laplacian images.
4973 If given 'nb_iterations' is '0', inversion is done in Fourier
4974 space (single iteration),
4975 otherwise, by applying 'nb_iterations' of a Laplacian-inversion
4976 PDE flow (with specified
4977 'time_step').
4978 Note that the resulting inversions are just estimation of pos‐
4979 sible/approximated solutions.
4980
4981 Default values: 'nb_iterations=0','time_step=10' and '[ini‐
4982 tial_estimated]=(undefined)'.
4983
4984 inn:
4985
4986 Compute gradient-directed 2nd derivative of image(s).
4987
4988 inpaint (+):
4989 [mask] |
4990 [mask],0,_fast_method |
4991 [mask],_patch_size>=1,_lookup_size>=1,_lookup_fac‐
4992 tor>=0,_lookup_increment!=0,
4993 _blend_size>=0,0<=_blend_thresh‐
4994 old<=1,_blend_decay>=0,_blend_scales>=1,
4995 _is_blend_outer={ 0 | 1 }
4996
4997 Inpaint selected images by specified mask.
4998 If no patch size (or 0) is specified, inpainting is done using
4999 a fast average or median
5000 algorithm.
5001 Otherwise, it used a patch-based reconstruction method, that
5002 can be very time consuming.
5003 'fast_method' can be { 0=low-connectivity average | 1=high-con‐
5004 nectivity average |
5005 2=low-connectivity median | 3=high-connectivity median }.
5006
5007 Default values: 'patch_size=0', 'fast_method=1',
5008 'lookup_size=22', 'lookup_factor=0.5',
5009 'lookup_increment=1', 'blend_size=0', 'blend_threshold=0',
5010 'blend_decay=0.05',
5011 'blend_scales=10' and 'is_blend_outer=1'.
5012
5013 inpaint_pde:
5014 [mask],_nb_scales[%]>=0,_diffusion_type={ 0=isotropic |
5015 1=delaunay-guided |
5016 2=edge-guided | 3=mask-guided },_diffusion_iter>=0
5017
5018 Inpaint selected images by specified mask using a multiscale
5019 transport-diffusion algorithm.
5020 If 'diffusion type==3', non-zero values of the mask (e.g. a
5021 distance function) are used
5022 to guide the diffusion process.
5023
5024 Default values: 'nb_scales=75%', 'diffusion_type=1' and 'diffu‐
5025 sion_iter=20'.
5026
5027 inpaint_flow:
5028 [mask],_nb_global_iter>=0,_nb_local_iter>=0,_dt>0,_alpha>=0,_sigma>=0
5029
5030 Apply iteration of the inpainting flow on selected images.
5031
5032 Default values: 'nb_global_iter=4', 'nb_global_iter=15',
5033 'dt=10', 'alpha=1' and 'sigma=3'.
5034
5035 inpaint_holes:
5036 maximal_area[%]>=0,_tolerance>=0,_is_high_connectivity={ 0 | 1
5037 }
5038
5039 Inpaint all connected regions having an area less than speci‐
5040 fied value.
5041
5042 Default values: 'maximal_area=4', 'tolerance=0' and
5043 'is_high_connectivity=0'.
5044
5045 inpaint_morpho:
5046 [mask]
5047
5048 Inpaint selected images by specified mask using morphological
5049 operators.
5050
5051 inpaint_matchpatch:
5052 [mask],_nb_scales={ 0=auto | >0 },_patch_size>0,_nb_itera‐
5053 tions_per_scale>0,
5054 _blend_size>=0,_allow_outer_blending={ 0 | 1
5055 },_is_already_initialized={ 0 | 1 }
5056
5057 Inpaint selected images by specified binary mask, using a
5058 multi-scale matchpatch algorithm.
5059
5060 Default values: 'nb_scales=0', 'patch_size=9', 'nb_itera‐
5061 tions_per_scale=10', 'blend_size=5',
5062 'allow_outer_blending=1' and 'is_already_initialized=0'.
5063
5064 kuwahara:
5065 size>0
5066
5067 Apply Kuwahara filter of specified size on selected images.
5068
5069 laplacian:
5070
5071 Compute Laplacian of selected images.
5072
5073 lic:
5074 _amplitude>0,_channels>0
5075
5076 Render LIC representation of selected vector fields.
5077
5078 Default values: 'amplitude=30' and 'channels=1'.
5079
5080 map_tones:
5081 _threshold>=0,_gamma>=0,_smoothness>=0,nb_iter>=0
5082
5083 Apply tone mapping operator on selected images, based on Pois‐
5084 son equation.
5085
5086 Default values: 'threshold=0.1', 'gamma=0.8', 'smoothness=0.5'
5087 and 'nb_iter=30'.
5088
5089 map_tones_fast:
5090 _radius[%]>=0,_power>=0
5091
5092 Apply fast tone mapping operator on selected images.
5093
5094 Default values: 'radius=3%' and 'power=0.3'.
5095
5096 meancurvature_flow:
5097 _nb_iter>=0,_dt,_keep_sequence={ 0 | 1 }
5098
5099 Apply iterations of the mean curvature flow on selected images.
5100
5101 Default values: 'nb_iter=10', 'dt=30' and 'keep_sequence=0'.
5102
5103 median (+):
5104 size>=0,_threshold>0
5105
5106 Apply (opt. thresholded) median filter on selected images with
5107 structuring element size x size.
5108
5109 nlmeans:
5110 [guide],_patch_radius>0,_spatial_bandwidth>0,_tonal_band‐
5111 width>0,
5112 _patch_measure_command |
5113 _patch_radius>0,_spatial_bandwidth>0,_tonal_band‐
5114 width>0,_patch_measure_command
5115
5116 Apply non local means denoising of Buades et al, 2005. on
5117 selected images.
5118 The patch is a gaussian function of 'std _patch_radius'.
5119 The spatial kernel is a rectangle of radius 'spatial_band‐
5120 width'.
5121 The tonal kernel is exponential (exp(-d^2/_tonal_bandwidth^2))
5122 with d the euclidiean distance between image patches.
5123
5124 Default values: 'patch_radius=4', 'spatial_bandwidth=4',
5125 'tonal_bandwidth=10' and
5126 'patch_measure_command=-norm'.
5127
5128 nlmeans_core:
5129 _reference_image,_scaling_map,_patch_radius>0,_spatial_band‐
5130 width>0
5131
5132 Apply non local means denoising using a image for weight and a
5133 map for scaling
5134
5135 normalize_local:
5136 _ampli‐
5137 tude>=0,_radius>0,_n_smooth>=0[%],_a_smooth>=0[%],_is_cut={ 0 | 1 },
5138 _min=0,_max=255
5139
5140 Normalize selected images locally.
5141
5142 Default values: 'amplitude=3', 'radius=16', 'n_smooth=4%',
5143 'a_smooth=2%', 'is_cut=1', 'min=0'
5144 and 'max=255'.
5145
5146 normalized_cross_correlation:
5147 [mask]
5148
5149 Compute normalized cross-correlation of selected images with
5150 specified mask.
5151
5152 peronamalik_flow:
5153 K_factor>0,_nb_iter>=0,_dt,_keep_sequence={ 0 | 1 }
5154
5155 Apply iterations of the Perona-Malik flow on selected images.
5156
5157 Default values: 'K_factor=20', 'nb_iter=5', 'dt=5' and
5158 'keep_sequence=0'.
5159
5160 phase_correlation:
5161 [destination]
5162
5163 Estimate translation vector between selected source images and
5164 specified destination.
5165
5166 pde_flow:
5167 _nb_iter>=0,_dt,_velocity_command,_keep_sequence={ 0 | 1 }
5168
5169 Apply iterations of a generic PDE flow on selected images.
5170
5171 Default values: 'nb_iter=10', 'dt=30', 'velocity_command=lapla‐
5172 cian' and 'keep_sequence=0'.
5173
5174 periodize_poisson:
5175
5176 Periodize selected images using a Poisson solver in Fourier
5177 space.
5178
5179 red_eye:
5180 0<=_threshold<=100,_smoothness>=0,0<=attenuation<=1
5181
5182 Attenuate red-eye effect in selected images.
5183
5184 Default values: 'threshold=75', 'smoothness=3.5' and 'attenua‐
5185 tion=0.1'.
5186
5187 remove_hotpixels:
5188 _mask_size>0, _threshold[%]>0
5189
5190 Remove hot pixels in selected images.
5191
5192 Default values: 'mask_size=3' and 'threshold=10%'.
5193
5194 remove_pixels:
5195 number_of_pixels[%]>=0
5196
5197 Remove specified number of pixels (i.e. set them to 0) from the
5198 set of non-zero pixels in
5199 selected images.
5200
5201 rolling_guidance:
5202 std_deviation_s[%]>=0,std_deviation_r[%]>=0,_precision>=0
5203
5204 Apply the rolling guidance filter on selected image.
5205 Rolling guidance filter is a fast image abstraction filter,
5206 described in:
5207 "Rolling Guidance Filter", Qi Zhang Xiaoyong, Shen Li, Xu Jiaya
5208 Jia, ECCV'2014.
5209
5210 Default values: 'std_deviation_s=4', 'std_deviation_r=10' and
5211 'precision=0.5'.
5212
5213 sharpen (+):
5214 amplitude>=0 |
5215 amplitude>=0,edge>=0,_alpha,_sigma
5216
5217 Sharpen selected images by inverse diffusion or shock filters
5218 methods.
5219 'edge' must be specified to enable shock-filter method.
5220
5221 Default values: 'alpha=0' and 'sigma=0'.
5222
5223 smooth (+):
5224 amplitude[%]>=0,_sharpness>=0,0<=_anisot‐
5225 ropy<=1,_alpha[%],_sigma[%],_dl>0,_da>0,
5226 _precision>0,_interpolation,_fast_approx={ 0 | 1 } |
5227 nb_iterations>=0,_sharpness>=0,_anisot‐
5228 ropy,_alpha,_sigma,_dt>0,0 |
5229 [tensor_field],_amplitude>=0,_dl>0,_da>0,_precision>0,_interpo‐
5230 lation,
5231 _fast_approx={ 0 | 1 } |
5232 [tensor_field],_nb_iters>=0,_dt>0,0
5233
5234 Smooth selected images anisotropically using diffusion PDE's,
5235 with specified field of
5236 diffusion tensors.
5237 'interpolation' can be { 0=nearest | 1=linear | 2=runge-kutta
5238 }.
5239
5240 Default values: 'sharpness=0.7', 'anisotropy=0.3', 'alpha=0.6',
5241 'sigma=1.1', 'dl=0.8', 'da=30',
5242 'precision=2', 'interpolation=0' and 'fast_approx=1'.
5243
5244 split_freq:
5245 smoothness>0[%]
5246
5247 Split selected images into low and high frequency parts.
5248
5249 solve_poisson:
5250 "laplacian_command",_nb_itera‐
5251 tions>=0,_time_step>0,_nb_scales>=0
5252
5253 Solve Poisson equation so that applying 'laplacian[n]' is close
5254 to the result of
5255 'laplacian_command[n]'.
5256 Solving is performed using a multi-scale gradient descent algo‐
5257 rithm.
5258 If 'nb_scales=0', the number of scales is automatically deter‐
5259 mined.
5260
5261 Default values: 'nb_iterations=60', 'dt=5' and 'nb_scales=0'.
5262
5263 split_details:
5264 _nb_scales>0,_base_scale[%]>=0,_detail_scale[%]>=0
5265
5266 Split selected images into 'nb_scales' detail scales.
5267 If 'base_scale'=='detail_scale'==0, the image decomposition is
5268 done with 'a trous' wavelets.
5269 Otherwise, it uses laplacian pyramids with linear standard
5270 deviations.
5271
5272 Default values: 'nb_scales=4', 'base_scale=0' and
5273 'detail_scale=0'.
5274
5275 structuretensors (+):
5276 _scheme={ 0=centered | 1=forward/backward }
5277
5278 Compute the structure tensor field of selected images.
5279
5280 Default value: 'scheme=1'.
5281
5282 solidify:
5283 _smoothness[%]>=0,_diffusion_type={ 0=isotropic | 1=delaunay-
5284 oriented |
5285 2=edge-oriented },_diffusion_iter>=0
5286
5287 Solidify selected transparent images.
5288
5289 Default values: 'smoothness=75%', 'diffusion_type=1' and 'dif‐
5290 fusion_iter=20'.
5291
5292 syntexturize:
5293 _width[%]>0,_height[%]>0
5294
5295 Resynthetize 'width'x'height' versions of selected micro-tex‐
5296 tures by phase randomization.
5297 The texture synthesis algorithm is a straightforward implemen‐
5298 tation of the method described in :
5299 http://www.ipol.im/pub/art/2011/ggm_rpn/
5300
5301 Default values: 'width=height=100%'.
5302
5303 syntexturize_matchpatch:
5304 _width[%]>0,_height[%]>0,_nb_scales>=0,_patch_size>0,_blend‐
5305 ing_size>=0,
5306 _precision>=0
5307
5308 Resynthetize 'width'x'height' versions of selected micro-tex‐
5309 tures using a patch-matching
5310 algorithm.
5311 If 'nbscales==0', the number of scales used is estimated from
5312 the image size.
5313
5314 Default values: 'width=height=100%', 'nb_scales=0',
5315 'patch_size=7', 'blending_size=5' and
5316 'precision=1'.
5317
5318 tv_flow:
5319 _nb_iter>=0,_dt,_keep_sequence={ 0 | 1 }
5320
5321 Apply iterations of the total variation flow on selected
5322 images.
5323
5324 Default values: 'nb_iter=10', 'dt=30' and 'keep_sequence=0'.
5325
5326 unsharp:
5327 radius[%]>=0,_amount>=0,_threshold[%]>=0
5328
5329 Apply unsharp mask on selected images.
5330
5331 Default values: 'amount=2' and 'threshold=0'.
5332
5333 unsharp_octave:
5334 _nb_scales>0,_radius[%]>=0,_amount>=0,threshold[%]>=0
5335
5336 Apply octave sharpening on selected images.
5337
5338 Default values: 'nb_scales=4', 'radius=1', 'amount=2' and
5339 'threshold=0'.
5340
5341 vanvliet (+):
5342 std_deviation>=0[%],order={ 0 | 1 | 2 | 3 },axis={ x | y | z |
5343 c },
5344 _boundary_conditions
5345
5346 Apply Vanvliet recursive filter on selected images, along spec‐
5347 ified axis and with
5348 specified standard deviation, order and boundary conditions.
5349 'boundary_conditions' can be { 0=dirichlet | 1=neumann }.
5350
5351 Default value: 'boundary_conditions=1'.
5352
5353 voronoi:
5354
5355 Compute the discrete Voronoi diagram of non-zero pixels in
5356 selected images.
5357
5358 watermark_fourier:
5359 text,_size>0
5360
5361 Add a textual watermark in the frequency domain of selected
5362 images.
5363
5364 Default value: 'size=33'.
5365
5366 watershed (+):
5367 [priority_image],_is_high_connectivity={ 0 | 1 }
5368
5369 Compute the watershed transform of selected images.
5370
5371 Default value: 'is_high_connectivity=1'.
5372
5373 ** Features Extraction:
5374
5375 area:
5376 tolerance>=0,is_high_connectivity={ 0 | 1 }
5377
5378 Compute area of connected components in selected images.
5379
5380 Default values: 'is_high_connectivity=0'.
5381
5382 area_fg:
5383 tolerance>=0,is_high_connectivity={ 0 | 1 }
5384
5385 Compute area of connected components for non-zero values in
5386 selected images.
5387 Similar to 'area' except that 0-valued pixels are not consid‐
5388 ered.
5389
5390 Default values: 'is_high_connectivity=0'.
5391
5392 at_line:
5393 x0[%],y0[%],z0[%],x1[%],y1[%],z1[%]
5394
5395 Retrieve pixels of the selected images belonging to the speci‐
5396 fied line (x0,y0,z0)-(x1,y1,z1).
5397
5398 at_quadrangle:
5399 x0[%],y0[%],x1[%],y1[%],x2[%],y2[%],x3[%],y3[%],_interpolation,
5400 _boundary_conditions |
5401 x0[%],y0[%],z0[%],x1[%],y1[%],z1[%],x2[%],y2[%],z2[%],x3[%],y3[%],z3[%],
5402 _interpolation,_boundary_conditions
5403
5404 Retrieve pixels of the selected images belonging to the speci‐
5405 fied 2D or 3D quadrangle.
5406 'interpolation' can be { 0=nearest-neighbor | 1=linear |
5407 2=cubic }.
5408 'boundary_conditions' can be { 0=dirichlet | 1=neumann |
5409 2=periodic | 3=mirror }.
5410
5411 barycenter:
5412
5413 Compute the barycenter vector of pixel values.
5414
5415 delaunay:
5416
5417 Generate discrete 2D Delaunay triangulation of non-zero pixels
5418 in selected images.
5419 Input images must be scalar.
5420 Each pixel of the output image is a triplet (a,b,c) meaning the
5421 pixel belongs to
5422 the Delaunay triangle 'ABC' where 'a','b','c' are the labels of
5423 the pixels 'A','B','C'.
5424
5425 detect_skin:
5426 0<=tolerance<=1,_skin_x,_skin_y,_skin_radius>=0
5427
5428 Detect skin in selected color images and output an appartenance
5429 probability map.
5430 Detection is performed using CbCr chromaticity data of skin
5431 pixels.
5432 If arguments 'skin_x', 'skin_y' and 'skin_radius' are provided,
5433 skin pixels are learnt
5434 from the sample pixels inside the circle located at
5435 ('skin_x','skin_y') with radius
5436 'skin_radius'.
5437
5438 Default value: 'tolerance=0.5' and 'skin_x=skiny=radius=-1'.
5439
5440 displacement (+):
5441 [source_image],_smoothness,_precision>=0,_nb_scales>=0,_itera‐
5442 tion_max>=0,
5443 is_backward={ 0 | 1 },_[guide]
5444
5445 Estimate displacement field between specified source and
5446 selected target images.
5447 If 'smoothness>=0', regularization type is set to isotropic,
5448 else to anisotropic.
5449 If 'nbscales==0', the number of scales used is estimated from
5450 the image size.
5451
5452 Default values: 'smoothness=0.1', 'precision=5', 'nb_scales=0',
5453 'iteration_max=10000',
5454 'is_backward=1' and '[guide]=(unused)'.
5455
5456 distance (+):
5457 isovalue[%],_metric |
5458 isovalue[%],[metric],_method
5459
5460 Compute the unsigned distance function to specified isovalue,
5461 opt. according to a custom metric.
5462 'metric' can be { 0=chebyshev | 1=manhattan | 2=euclidean |
5463 3=squared-euclidean }.
5464 'method' can be { 0=fast-marching | 1=low-connectivity dijkstra
5465 | 2=high-connectivity dijkstra |
5466 3=1+return path | 4=2+return path }.
5467
5468 Default value: 'metric=2' and 'method=0'.
5469
5470 fftpolar:
5471
5472 Compute fourier transform of selected images, as centered mag‐
5473 nitude/phase images.
5474
5475 histogram (+):
5476 _nb_levels>0[%],_value0[%],_value1[%]
5477
5478 Compute the histogram of selected images.
5479 If value range is set, the histogram is estimated only for pix‐
5480 els in the specified
5481 value range. Argument 'value1' must be specified if 'value0' is
5482 set.
5483
5484 Default values: 'nb_levels=256', 'value0=0%' and 'value1=100%'.
5485
5486 histogram_nd:
5487 nb_levels>0[%],_value0[%],_value1[%]
5488
5489 Compute the 1D,2D or 3D histogram of selected multi-channels
5490 images (having 1,2 or 3 channels).
5491 If value range is set, the histogram is estimated only for pix‐
5492 els in the specified
5493 value range.
5494
5495 Default values: 'value0=0%' and 'value1=100%'.
5496
5497 histogram_cumul:
5498 _nb_levels>0,_is_normalized={ 0 | 1 },_val0[%],_val1[%]
5499
5500 Compute cumulative histogram of selected images.
5501
5502 Default values: 'nb_levels=256', 'is_normalized=0', 'val0=0%'
5503 and 'val1=100%'.
5504
5505 histogram_pointwise:
5506 nb_levels>0[%],_value0[%],_value1[%]
5507
5508 Compute the histogram of each vector-valued point of selected
5509 images.
5510 If value range is set, the histogram is estimated only for val‐
5511 ues in the specified
5512 value range.
5513
5514 Default values: 'value0=0%' and 'value1=100%'.
5515
5516 hough:
5517 _width>0,_height>0,gradient_norm_voting={ 0 | 1 }
5518
5519 Compute hough transform (theta,rho) of selected images.
5520
5521 Default values: 'width=512', 'height=width' and 'gradi‐
5522 ent_norm_voting=1'.
5523
5524 ifftpolar:
5525
5526 Compute inverse fourier transform of selected images, from cen‐
5527 tered magnitude/phase images.
5528
5529 isophotes:
5530 _nb_levels>0
5531
5532 Render isophotes of selected images on a transparent back‐
5533 ground.
5534
5535 Default value: 'nb_levels=64'
5536
5537 label (+):
5538 _tolerance>=0,is_high_connectivity={ 0 | 1 }
5539
5540 Label connected components in selected images.
5541
5542 Default values: 'tolerance=0' and 'is_high_connectivity=0'.
5543
5544 label_fg:
5545 tolerance>=0,is_high_connectivity={ 0 | 1 }
5546
5547 Label connected components for non-zero values (foreground) in
5548 selected images.
5549 Similar to 'label' except that 0-valued pixels are not labeled.
5550
5551 Default value: 'is_high_connectivity=0'.
5552
5553 max_patch:
5554 _patch_size>=1
5555
5556 Return locations of maximal values in local patch-based neigh‐
5557 borhood of given size for selected images.
5558
5559 Default value: 'patch_size=16'.
5560
5561 min_patch:
5562 _patch_size>=1
5563
5564 Return locations of minimal values in local patch-based neigh‐
5565 borhood of given size for selected images.
5566
5567 Default value: 'patch_size=16'.
5568
5569 minimal_path:
5570 x0[%]>=0,y0[%]>=0,z0[%]>=0,x1[%]>=0,y1[%]>=0,z1[%]>=0,_is_high_con‐
5571 nectivity={ 0 | 1 }
5572
5573 Compute minimal path between two points on selected potential
5574 maps.
5575
5576 Default value: 'is_high_connectivity=0'.
5577
5578 mse (+):
5579
5580 Compute MSE (Mean-Squared Error) matrix between selected
5581 images.
5582
5583 patches:
5584 patch_width>0,patch_height>0,patch_depth>0,x0,y0,z0,_x1,_y1,_z1,...,_xN,_yN,_zN
5585
5586 Extract N+1 patches from selected images, centered at specified
5587 locations.
5588
5589 matchpatch (+):
5590 [patch_image],patch_width>=1,_patch_height>=1,_patch_depth>=1,_nb_iter‐
5591 ations>=0,
5592 _nb_randoms>=0,_occ_penalization,_output_score={ 0 | 1
5593 },_[guide]
5594
5595 Estimate correspondence map between selected images and speci‐
5596 fied patch image, using
5597 a patch-matching algorithm.
5598 Each pixel of the returned correspondence map gives the loca‐
5599 tion (p,q) of the closest patch in
5600 the specified patch image. If 'output_score=1', the third chan‐
5601 nel also gives the corresponding
5602 matching score for each patch as well.
5603
5604 Default values: 'patch_height=patch_width', 'patch_depth=1',
5605 'nb_iterations=5', 'nb_randoms=5',
5606 'occ_penalization=0', 'output_score=0' and 'guide=(unde‐
5607 fined)'.
5608
5609 plot2value:
5610
5611 Retrieve values from selected 2D graph plots.
5612
5613 pointcloud:
5614 _type = { -X=-X-opacity | 0=binary | 1=cumulative | 2=label |
5615 3=retrieve
5616 coordinates },_width,_height>0,_depth>0
5617
5618 Render a set of point coordinates, as a point cloud in a 1D/2D
5619 or 3D binary image
5620 (or do the reverse, i.e. retrieve coordinates of non-zero
5621 points from a rendered point cloud).
5622 Input point coordinates can be a NxMx1x1, Nx1x1xM or 1xNx1xM
5623 image, where 'N' is the number of points,
5624 and M the point coordinates.
5625 If 'M'>3, the 3-to-M components sets the (M-3)-dimensional
5626 color at each point.
5627 Parameters 'width','height' and 'depth' are related to the size
5628 of the final image :
5629 - If set to 0, the size is automatically set along the speci‐
5630 fied axis.
5631 - If set to N>0, the size along the specified axis is N.
5632 - If set to N<0, the size along the specified axis is at most
5633 N.
5634 Points with coordinates that are negative or higher than speci‐
5635 fied ('width','height','depth')
5636 are not plotted.
5637
5638 Default values: 'type=0' and
5639 'max_width=max_height=max_depth=0'.
5640
5641 psnr:
5642 _max_value
5643
5644 Compute PSNR (Peak Signal-to-Noise Ratio) matrix between
5645 selected images.
5646
5647 Default value: 'max_value=255'.
5648
5649 segment_watershed:
5650 _threshold>=0
5651
5652 Apply watershed segmentation on selected images.
5653
5654 Default values: 'threshold=2'.
5655
5656 shape2bump:
5657 _resolution>=0,0<=_weight_avg_max_avg<=1,_dilation,_smooth‐
5658 ness>=0
5659
5660 Estimate bumpmap from binary shape in selected images.
5661
5662 Default value: 'resolution=256', 'weight_avg_max=0.75', 'dila‐
5663 tion=0' and 'smoothness=100'.
5664
5665 skeleton:
5666 _boundary_conditions={ 0=dirichlet | 1=neumann }
5667
5668 Compute skeleton of binary shapes using distance transform and
5669 constrained thinning.
5670
5671 Default value: 'boundary_conditions=1'.
5672
5673 slic:
5674 size>0,_regularity>=0,_nb_iterations>0
5675
5676 Segment selected 2D images with superpixels, using the SLIC
5677 algorithm (Simple Linear Iterative
5678 Clustering).
5679 Scalar images of increasingly labeled pixels are returned.
5680 Reference paper: Achanta, R., Shaji, A., Smith, K., Lucchi, A.,
5681 Fua, P., & Süsstrunk, S.
5682 (2010). SLIC Superpixels (No. EPFL-REPORT-149300).
5683
5684 Default values: 'size=16', 'regularity=10' and 'nb_itera‐
5685 tions=10'.
5686
5687 ssd_patch:
5688 [patch],_use_fourier={ 0 | 1 },_boundary_conditions={ 0=dirich‐
5689 let | 1=neumann }
5690
5691 Compute fields of SSD between selected images and specified
5692 patch.
5693 Argument 'boundary_conditions' is valid only when
5694 'use_fourier=0'.
5695
5696 Default value: 'use_fourier=0' and 'boundary_conditions=0'.
5697
5698 thinning:
5699 _boundary_conditions={ 0=dirichlet | 1=neumann }
5700
5701 Compute skeleton of binary shapes using morphological thinning
5702 (beware, this is a quite slow iterative process)
5703
5704 Default value: 'boundary_conditions=1'.
5705
5706 tones:
5707 N>0
5708
5709 Get N tones masks from selected images.
5710
5711 topographic_map:
5712 _nb_levels>0,_smoothness
5713
5714 Render selected images as topographic maps.
5715
5716 Default values: 'nb_levels=16' and 'smoothness=2'.
5717
5718 tsp:
5719 _precision>=0
5720
5721 Try to solve the 'travelling salesman' problem, using a combi‐
5722 nation of greedy search and 2-opt
5723 algorithms.
5724 Selected images must have dimensions Nx1x1xC to represent N
5725 cities each with C-dimensional
5726 coordinates.
5727 This command re-order the selected data along the x-axis so
5728 that the point sequence becomes a
5729 shortest path.
5730
5731 Default values: 'precision=256'.
5732
5733 variance_patch:
5734 _patch_size>=1
5735
5736 Compute variance of each images patch centered at (x,y), in
5737 selected images.
5738
5739 Default value: 'patch_size=16'
5740
5741 ** Image Drawing:
5742
5743 arrow:
5744 x0[%],y0[%],x1[%],y1[%],_thickness[%]>=0,_head_length[%]>=0,
5745 _head_thickness[%]>=0,_opacity,_pattern,_color1,...
5746
5747 Draw specified arrow on selected images.
5748 'pattern' is an hexadecimal number starting with '0x' which can
5749 be omitted
5750 even if a color is specified. If a pattern is specified, the
5751 arrow is
5752 drawn outlined instead of filled.
5753
5754 Default values: 'thickness=1%', 'head_length=10%', 'head_thick‐
5755 ness=3%', 'opacity=1',
5756 'pattern=(undefined)' and 'color1=0'.
5757
5758 axes:
5759 x0,x1,y0,y1,_font_height>=0,_opacity,_pattern,_color1,...
5760
5761 Draw xy-axes on selected images.
5762 'pattern' is an hexadecimal number starting with '0x' which can
5763 be omitted
5764 even if a color is specified.
5765 To draw only one x-axis at row Y, set both 'y0' and 'y1' to Y.
5766 To draw only one y-axis at column X, set both 'x0' and 'x1' to
5767 X.
5768
5769 Default values: 'font_height=14', 'opacity=1', 'pattern=(unde‐
5770 fined)' and 'color1=0'.
5771
5772 ball:
5773 _size>0, _R,_G,_B,0<=_specular_light<=8,0<=_specu‐
5774 lar_size<=8,_shadow>=0
5775
5776 Input a 2D RGBA colored ball sprite.
5777
5778 Default values: 'size=64', 'R=255', 'G=R', 'B=R', 'specu‐
5779 lar_light=0.8', 'specular_size=1' and
5780 'shading=1.5'.
5781
5782 chessboard:
5783 size1>0,_size2>0,_offset1,_offset2,_angle,_opac‐
5784 ity,_color1,...,_color2,...
5785
5786 Draw chessboard on selected images.
5787
5788 Default values: 'size2=size1', 'offset1=offset2=0', 'angle=0',
5789 'opacity=1', 'color1=0' and
5790 'color2=255'.
5791
5792 cie1931:
5793
5794 Draw CIE-1931 chromaticity diagram on selected images.
5795
5796 circle:
5797 x[%],y[%],R[%],_opacity,_pattern,_color1,...
5798
5799 Draw specified colored circle on selected images.
5800 A radius of '100%' stands for 'sqrt(width^2+height^2)'.
5801 'pattern' is an hexadecimal number starting with '0x' which can
5802 be omitted
5803 even if a color is specified. If a pattern is specified, the
5804 circle is
5805 drawn outlined instead of filled.
5806
5807 Default values: 'opacity=1', 'pattern=(undefined)' and
5808 'color1=0'.
5809
5810 close_binary:
5811 0<=_endpoint_rate<=100,_endpoint_connectivity>=0,_spline_dist‐
5812 max>=0,
5813 _segment_distmax>=0,0<=_spline_anglemax<=180,_spline_round‐
5814 ness>=0,_area_min>=0,
5815 _allow_self_intersection={ 0 | 1 }
5816
5817 Automatically close open shapes in binary images (defining
5818 white strokes on black background).
5819
5820 Default values: 'endpoint_rate=75', 'endpoint_connectivity=2',
5821 'spline_distmax=80',
5822 'segment_distmax=20', 'spline_anglemax=90', 'spline_round‐
5823 ness=1','area_min=100',
5824 'allow_self_intersection=1'.
5825
5826 ellipse (+):
5827 x[%],y[%],R[%],r[%],_angle,_opacity,_pattern,_color1,...
5828
5829 Draw specified colored ellipse on selected images.
5830 A radius of '100%' stands for 'sqrt(width^2+height^2)'.
5831 'pattern' is an hexadecimal number starting with '0x' which can
5832 be omitted
5833 even if a color is specified. If a pattern is specified, the
5834 ellipse is
5835 drawn outlined instead of filled.
5836
5837 Default values: 'opacity=1', 'pattern=(undefined)' and
5838 'color1=0'.
5839
5840 flood (+):
5841 x[%],_y[%],_z[%],_tolerance>=0,_is_high_connectivity={ 0 | 1
5842 },_opacity,_color1,...
5843
5844 Flood-fill selected images using specified value and tolerance.
5845
5846 Default values: 'y=z=0', 'tolerance=0', 'is_high_connectiv‐
5847 ity=0', 'opacity=1' and 'color1=0'.
5848
5849 gaussian:
5850 _sigma1[%],_sigma2[%],_angle
5851
5852 Draw a centered gaussian on selected images, with specified
5853 standard deviations and orientation.
5854
5855 Default values: 'sigma1=3', 'sigma2=sigma1' and 'angle=0'.
5856
5857 graph (+):
5858 [function_image],_plot_type,_vertex_type,_ymin,_ymax,_opac‐
5859 ity,_pattern,_color1,... |
5860 'formula',_resolution>=0,_plot_type,_ver‐
5861 tex_type,_xmin,xmax,_ymin,_ymax,
5862 _opacity,_pattern,_color1,...
5863
5864 Draw specified function graph on selected images.
5865 'plot_type' can be { 0=none | 1=lines | 2=splines | 3=bar }.
5866 'vertex_type' can be { 0=none | 1=points | 2,3=crosses |
5867 4,5=circles | 6,7=squares }.
5868 'pattern' is an hexadecimal number starting with '0x' which can
5869 be omitted
5870 even if a color is specified.
5871
5872 Default values: 'plot_type=1', 'vertex_type=1', 'ymin=ymax=0
5873 (auto)', 'opacity=1',
5874 'pattern=(undefined)'
5875 and 'color1=0'.
5876
5877 grid:
5878 size_x[%]>=0,size_y[%]>=0,_offset_x[%],_offset_y[%],_opac‐
5879 ity,_pattern,_color1,...
5880
5881 Draw xy-grid on selected images.
5882 'pattern' is an hexadecimal number starting with '0x' which can
5883 be omitted
5884 even if a color is specified.
5885
5886 Default values: 'offset_x=offset_y=0', 'opacity=1', 'pat‐
5887 tern=(undefined)' and 'color1=0'.
5888
5889 image (+):
5890 [sprite],_x[%|~],_y[%|~],_z[%|~],_c[%|~],_opacity,_[opac‐
5891 ity_mask],
5892 _max_opacity_mask
5893
5894 Draw specified sprite image on selected images.
5895 (eq. to 'j').
5896 If one of the x,y,z or c argument ends with a '~', its value is
5897 expected to be
5898 a centering ratio (in [0,1]) rather than a position.
5899 Usual centering ratio are { 0=left-justified | 0.5=centered |
5900 1=right-justified }.
5901
5902 Default values: 'x=y=z=c=0', 'opacity=1', 'opacity_mask=(unde‐
5903 fined)' and 'max_opacity_mask=1'.
5904
5905 line (+):
5906 x0[%],y0[%],x1[%],y1[%],_opacity,_pattern,_color1,...
5907
5908 Draw specified colored line on selected images.
5909 'pattern' is an hexadecimal number starting with '0x' which can
5910 be omitted
5911 even if a color is specified.
5912
5913 Default values: 'opacity=1', 'pattern=(undefined)' and
5914 'color1=0'.
5915
5916 linethick:
5917 x0[%],y0[%],x1[%],y1[%],_thickness,_opacity,_color1
5918
5919 Draw specified colored thick line on selected images.
5920
5921 Default values: 'thickness=2', 'opacity=1' and 'color1=0'.
5922
5923 mandelbrot (+):
5924 z0r,z0i,z1r,z1i,_iteration_max>=0,_is_julia={ 0 | 1
5925 },_c0r,_c0i,_opacity
5926
5927 Draw mandelbrot/julia fractal on selected images.
5928
5929 Default values: 'iteration_max=100', 'is_julia=0', 'c0r=c0i=0'
5930 and 'opacity=1'.
5931
5932 marble:
5933 _image_weight,_pattern_weight,_angle,_amplitude,_sharp‐
5934 ness>=0,_anisotropy>=0,
5935 _alpha,_sigma,_cut_low>=0,_cut_high>=0
5936
5937 Render marble like pattern on selected images.
5938
5939 Default values: 'image_weight=0.2', 'pattern_weight=0.1',
5940 'angle=45', 'amplitude=0',
5941 'sharpness=0.4' and 'anisotropy=0.8',
5942 'alpha=0.6', 'sigma=1.1' and 'cut_low=cut_high=0'.
5943
5944 maze:
5945 _width>0,_height>0,_cell_size>0
5946
5947 Input maze with specified size.
5948
5949 maze_mask:
5950 _cellsize>0
5951
5952 Input maze according to size and shape of selected mask images.
5953 Mask may contain disconnected shapes.
5954
5955 object3d (+):
5956 [object3d],_x[%],_y[%],_z,_opacity,_rendering_mode,_is_dou‐
5957 ble_sided={ 0 | 1 },
5958 _is_zbuffer={ 0 | 1
5959 },_focale,_light_x,_light_y,_light_z,_specular_lightness,
5960 _specular_shininess
5961
5962 Draw specified 3D object on selected images.
5963 (eq. to 'j3d').
5964 'rendering_mode' can be { 0=dots | 1=wireframe | 2=flat |
5965 3=flat-shaded | 4=gouraud-shaded |
5966 5=phong-shaded }.
5967
5968 Default values: 'x=y=z=0', 'opacity=1' and 'is_zbuffer=1'. All
5969 other arguments take their
5970 default values
5971 from the 3D environment variables.
5972
5973 pack_sprites:
5974 _nb_scales>=0,0<=_min_scale<=100,_allow_rotation={ 0=0 deg. |
5975 1=180 deg. | 2=90
5976 deg. | 3=any },_spacing,_precision>=0,max_iterations>=0
5977
5978 Try to randomly pack as many sprites as possible onto the
5979 'empty' areas of an image.
5980 Sprites can be eventually rotated and scaled during the packing
5981 process.
5982 First selected image is the canvas that will be filled with the
5983 sprites.
5984 Its last channel must be a binary mask whose zero values repre‐
5985 sent potential locations for
5986 drawing the sprites.
5987 All other selected images represent the sprites considered for
5988 packing.
5989 Their last channel must be a binary mask that represents the
5990 sprite shape (i.e. a 8-connected
5991 component).
5992 The order of sprite packing follows the order of specified
5993 sprites in the image list.
5994 Sprite packing is done on random locations and iteratively with
5995 decreasing scales.
5996 'nb_scales' sets the number of decreasing scales considered for
5997 all specified sprites to be packed.
5998 'min_scale' (in %) sets the minimal size considered for packing
5999 (specified as a percentage of the
6000 original sprite size).
6001 'spacing' can be positive or negative.
6002 'precision' tells about the desired number of failed trials
6003 before ending the filling process.
6004
6005 Default values: 'nb_scales=5', 'min_scale=25', 'allow_rota‐
6006 tion=3', 'spacing=1', 'precision=7'
6007 and 'max_iterations=256'.
6008
6009 piechart:
6010 label_height>=0,label_R,label_G,label_B,"label1",value1,R1,G1,B1,...,"labelN",
6011 valueN,RN,GN,BN
6012
6013 Draw pie chart on selected (RGB) images.
6014
6015 plasma (+):
6016 _alpha,_beta,_scale>=0
6017
6018 Draw a random colored plasma fractal on selected images.
6019 This command implements the so-called 'Diamond-Square' algo‐
6020 rithm.
6021
6022 Default values: 'alpha=1', 'beta=1' and 'scale=8'.
6023
6024 point (+):
6025 x[%],y[%],_z[%],_opacity,_color1,...
6026
6027 Set specified colored pixel on selected images.
6028
6029 Default values: 'z=0', 'opacity=1' and 'color1=0'.
6030
6031 polka_dots:
6032 diameter>=0,_density,_offset1,_offset2,_angle,_aliasing,_shad‐
6033 ing,_opacity,
6034 _color,...
6035
6036 Draw dots pattern on selected images.
6037
6038 Default values: 'density=20', 'offset1=offset2=50', 'angle=0',
6039 'aliasing=10', 'shading=1',
6040 'opacity=1' and 'color=255'.
6041
6042 polygon (+):
6043 N>=1,x1[%],y1[%],...,xN[%],yN[%],_opacity,_pattern,_color1,...
6044
6045 Draw specified colored N-vertices polygon on selected images.
6046 'pattern' is an hexadecimal number starting with '0x' which can
6047 be omitted
6048 even if a color is specified. If a pattern is specified, the
6049 polygon is
6050 drawn outlined instead of filled.
6051
6052 Default values: 'opacity=1', 'pattern=(undefined)' and
6053 'color1=0'.
6054
6055 quiver:
6056 [function_image],_sampling[%]>0,_factor>=0,_is_arrow={ 0 | 1
6057 },_opacity,_color1,...
6058
6059 Draw specified 2D vector/orientation field on selected images.
6060
6061 Default values: 'sampling=5%', 'factor=1', 'is_arrow=1', 'opac‐
6062 ity=1', 'pattern=(undefined)'
6063 and 'color1=0'.
6064
6065 rectangle:
6066 x0[%],y0[%],x1[%],y1[%],_opacity,_pattern,_color1,...
6067
6068 Draw specified colored rectangle on selected images.
6069 'pattern' is an hexadecimal number starting with '0x' which can
6070 be omitted
6071 even if a color is specified. If a pattern is specified, the
6072 rectangle is
6073 drawn outlined instead of filled.
6074
6075 Default values: 'opacity=1', 'pattern=(undefined)' and
6076 'color1=0'.
6077
6078 rorschach:
6079 'smoothness[%]>=0','mirroring={ 0=none | 1=x | 2=y | 3=xy }
6080
6081 Render rorschach-like inkblots on selected images.
6082
6083 Default values: 'smoothness=5%' and 'mirroring=1'.
6084
6085 sierpinski:
6086 recursion_level>=0
6087
6088 Draw Sierpinski triangle on selected images.
6089
6090 Default value: 'recursion_level=7'.
6091
6092 spiralbw:
6093 width>0,_height>0,_is_2dcoords={ 0 | 1 }
6094
6095 Input a 2D rectangular spiral image with specified size.
6096
6097 Default values: 'height=width' and 'is_2dcoords=0'.
6098
6099 spline:
6100 x0[%],y0[%],u0[%],v0[%],x1[%],y1[%],u1[%],v1[%],_opac‐
6101 ity,_color1,...
6102
6103 Draw specified colored spline curve on selected images (cubic
6104 hermite spline).
6105
6106 Default values: 'opacity=1' and 'color1=0'.
6107
6108 tetraedron_shade:
6109 x0,y0,z0,x1,y1,z1,x2,y2,z2,x3,y3,z3,R0,G0,B0,...,R1,G1,B1,...,R2,G2,B2,...,R3,G3,B3,...
6110
6111 Draw tetraedron with interpolated colors on selected (volumet‐
6112 ric) images.
6113
6114 text (+):
6115 text,_x[%|~],_y[%|~],_font_height[%]>=0,_opacity,_color1,...
6116
6117 Draw specified colored text string on selected images.
6118 (eq. to 't').
6119 If one of the x or y argument ends with a '~', its value is
6120 expected to be
6121 a centering ratio (in [0,1]) rather than a position.
6122 Usual centering ratio are { 0=left-justified | 0.5=centered |
6123 1=right-justified }.
6124 Sizes '13' and '128' are special and correspond to binary fonts
6125 (no-antialiasing).
6126 Any other font size is rendered with anti-aliasing.
6127 Specifying an empty target image resizes it to new dimensions
6128 such that the image contains
6129 the entire text string.
6130
6131 Default values: 'x=y=0.01~', 'font_height=16', 'opacity=1' and
6132 'color1=0'.
6133
6134 text_outline:
6135 text,_x[%|~],_y[%|~],_font_height[%]>0,_outline>=0,_opac‐
6136 ity,_color1,...
6137
6138 Draw specified colored and outlined text string on selected
6139 images.
6140 If one of the x or y argument ends with a '~', its value is
6141 expected to be
6142 a centering ratio (in [0,1]) rather than a position.
6143 Usual centering ratio are { 0=left-justified | 0.5=centered |
6144 1=right-justified }.
6145
6146 Default values: 'x=y=0.01~', 'font_height=7.5%', 'outline=2',
6147 'opacity=1',
6148 'color1=color2=color3=255' and 'color4=255'.
6149
6150 triangle_shade:
6151 x0,y0,x1,y1,x2,y2,R0,G0,B0,...,R1,G1,B1,...,R2,G2,B2,...
6152
6153 Draw triangle with interpolated colors on selected images.
6154
6155 truchet:
6156 _scale>0,_radius>=0,_pattern_type={ 0=straight | 1=curved }
6157
6158 Fill selected images with random truchet patterns.
6159
6160 Default values: 'scale=32', 'radius=5' and 'pattern_type=1'.
6161
6162 turbulence:
6163 _radius>0,_octaves={1,2,3...,12},_alpha>0,_differ‐
6164 ence={-10,10},_mode={0,1,2,3}
6165
6166 Render fractal noise or turbulence on selected images.
6167
6168 Default values: 'radius=32', 'octaves=6', 'alpha=3', 'differ‐
6169 ence=0' and 'mode=0'.
6170
6171 yinyang:
6172
6173 Draw a yin-yang symbol on selected images.
6174
6175 ** Matrix Computation:
6176
6177 dijkstra (+):
6178 starting_node>=0,ending_node>=0
6179
6180 Compute minimal distances and paths from specified adjacency
6181 matrices by the Dijkstra algorithm.
6182
6183 eigen (+):
6184
6185 Compute the eigenvalues and eigenvectors of selected symmetric
6186 matrices or matrix fields.
6187 If one selected image has 3 or 6 channels, it is regarded as a
6188 field of 2x2 or 3x3 symmetric matrices,
6189 whose eigen elements are computed at each point of the field.
6190
6191 invert (+):
6192
6193 Compute the inverse of the selected matrices.
6194
6195 solve (+):
6196 [image]
6197
6198 Solve linear system AX = B for selected B-matrices and speci‐
6199 fied A-matrix.
6200 If the system is under- or over-determined, the least square
6201 solution is returned.
6202
6203 svd (+):
6204
6205 Compute SVD decomposition of selected matrices.
6206
6207 transpose:
6208
6209 Transpose selected matrices.
6210
6211 trisolve (+):
6212 [image]
6213
6214 Solve tridiagonal system AX = B for selected B-vectors and
6215 specified tridiagonal A-matrix.
6216 Tridiagonal matrix must be stored as a 3 column vector, where
6217 2nd column contains the
6218 diagonal coefficients, while 1st and 3rd columns contain the
6219 left and right coefficients.
6220
6221 ** 3D Rendering:
6222
6223 add3d (+):
6224 tx,_ty,_tz |
6225 [object3d] |
6226 (no arg)
6227
6228 Shift selected 3D objects with specified displacement vector,
6229 or merge them with specified
6230 3D object, or merge all selected 3D objects together.
6231 (eq. to '+3d').
6232
6233 Default values: 'ty=tz=0'.
6234
6235 animate3d:
6236 _width>0,_height>0,_angle_dx,_angle_dy,_angle_dz,_zoom_fac‐
6237 tor>=0,_filename
6238
6239 Animate selected 3D objects in a window.
6240 If argument 'filename' is provided, each frame of the animation
6241 is saved as a numbered filename.
6242
6243 Default values: 'width=640', 'height=480', 'angle_dx=0',
6244 'angle_dy=1', 'angle_dz=0',
6245 'zoom_factor=1' and 'filename=(undefined)'.
6246
6247 apply_camera3d:
6248 pos_x,pos_y,pos_z,target_x,target_y,target_z,up_x,up_y,up_z
6249
6250 Apply 3D camera matrix to selected 3D objects.
6251
6252 Default values: 'target_x=0', 'target_y=0', 'target_z=0',
6253 'up_x=0', 'up_y=-1' and 'up_z=0'.
6254
6255 apply_matrix3d:
6256 a11,a12,a13,...,a31,a32,a33
6257
6258 Apply specified 3D rotation matrix to selected 3D objects.
6259
6260 array3d:
6261 size_x>=1,_size_y>=1,_size_z>=1,_offset_x[%],_offset_y[%],_off‐
6262 set_y[%]
6263
6264 Duplicate a 3D object along the X,Y and Z axes.
6265
6266 Default values: 'size_y=1', 'size_z=1' and 'offset_x=off‐
6267 set_y=offset_z=100%'.
6268
6269 arrow3d:
6270 x0,y0,z0,x1,y1,z1,_radius[%]>=0,_head_length[%]>=0,_head_radius[%]>=0
6271
6272 Input 3D arrow with specified starting and ending 3D points.
6273
6274 Default values: 'radius=5%', 'head_length=25%' and
6275 'head_radius=15%'.
6276
6277 axes3d:
6278 _size_x,_size_y,_size_z,_font_size>0,_label_x,_label_y,_label_z
6279
6280 Input 3D axes with specified sizes along the x,y and z orienta‐
6281 tions.
6282
6283 Default values: 'size_x=size_y=size_z=1', 'font_size=23',
6284 'label_x=X', 'label_y=Y' and
6285 'label_z=Z'.
6286
6287 box3d:
6288 _size_x,_size_y,_size_z
6289
6290 Input 3D box at (0,0,0), with specified geometry.
6291
6292 Default values: 'size_x=1' and 'size_z=size_y=size_x'.
6293
6294 center3d:
6295
6296 Center selected 3D objects at (0,0,0).
6297 (eq. to 'c3d').
6298
6299 circle3d:
6300 _x0,_y0,_z0,_radius>=0
6301
6302 Input 3D circle at specified coordinates.
6303
6304 Default values: 'x0=y0=z0=0' and 'radius=1'.
6305
6306 circles3d:
6307 _radius>=0,_is_wireframe={ 0 | 1 }
6308
6309 Convert specified 3D objects to sets of 3D circles with speci‐
6310 fied radius.
6311
6312 Default values: 'radius=1' and 'is_wireframe=1'.
6313
6314 color3d (+):
6315 R,_G,_B,_opacity
6316
6317 Set color and opacity of selected 3D objects.
6318 (eq. to 'col3d').
6319
6320 Default value: 'B=G=R' and 'opacity=(undefined)'.
6321
6322 colorcube3d:
6323
6324 Input 3D color cube.
6325
6326 cone3d:
6327 _radius,_height,_nb_subdivisions>0
6328
6329 Input 3D cone at (0,0,0), with specified geometry.
6330
6331 Default value: 'radius=1','height=1' and 'nb_subdivisions=24'.
6332
6333 cubes3d:
6334 _size>=0
6335
6336 Convert specified 3D objects to sets of 3D cubes with specified
6337 size.
6338
6339 Default value: 'size=1'.
6340
6341 cup3d:
6342 _resolution>0
6343
6344 Input 3D cup object.
6345
6346 cylinder3d:
6347 _radius,_height,_nb_subdivisions>0
6348
6349 Input 3D cylinder at (0,0,0), with specified geometry.
6350
6351 Default value: 'radius=1','height=1' and 'nb_subdivisions=24'.
6352
6353 delaunay3d:
6354
6355 Generate 3D delaunay triangulations from selected images.
6356 One assumes that the selected input images are binary images
6357 containing the set of points to mesh.
6358 The output 3D object is a mesh composed of non-oriented trian‐
6359 gles.
6360
6361 distribution3d:
6362
6363 Get 3D color distribution of selected images.
6364
6365 div3d (+):
6366 factor |
6367 factor_x,factor_y,_factor_z
6368
6369 Scale selected 3D objects isotropically or anisotropically,
6370 with the inverse of specified
6371 factors.
6372 (eq. to '/3d').
6373
6374 Default value: 'factor_z=0'.
6375
6376 double3d (+):
6377 _is_double_sided={ 0 | 1 }
6378
6379 Enable/disable double-sided mode for 3D rendering.
6380 (eq. to 'db3d').
6381
6382 Default value: 'is_double_sided=1'.
6383
6384 elevation3d (+):
6385 z-factor |
6386 [elevation_map] |
6387 'formula' |
6388 (no arg)
6389
6390 Build 3D elevation of selected images, with a specified eleva‐
6391 tion map.
6392 When invoked with (no arg) or 'z-factor', the elevation map is
6393 computed as the pointwise L2
6394 norm of the
6395 pixel values. Otherwise, the elevation map is taken from the
6396 specified image or formula.
6397
6398 empty3d:
6399
6400 Input empty 3D object.
6401
6402 extrude3d:
6403 _depth>0,_resolution>0,_smoothness[%]>=0
6404
6405 Generate extruded 3D object from selected binary XY-profiles.
6406
6407 Default values: 'depth=16', 'resolution=1024' and 'smooth‐
6408 ness=0.5%'.
6409
6410 focale3d (+):
6411 focale
6412
6413 Set 3D focale.
6414 (eq. to 'f3d').
6415 Set 'focale' to 0 to enable parallel projection (instead of
6416 perspective).
6417 Set negative 'focale' will disable 3D sprite zooming.
6418
6419 Default value: 'focale=700'.
6420
6421 gaussians3d:
6422 _size>0,_opacity
6423
6424 Convert selected 3D objects into set of 3D gaussian-shaped
6425 sprites.
6426
6427 gmic3d:
6428
6429 Input a 3D G'MIC logo.
6430
6431 gyroid3d:
6432 _resolution>0,_zoom
6433
6434 Input 3D gyroid at (0,0,0), with specified resolution.
6435
6436 Default values: 'resolution=32' and 'zoom=5'.
6437
6438 histogram3d:
6439
6440 Get 3D color histogram of selected images.
6441
6442 image6cube3d:
6443
6444 Generate 3D mapped cubes from 6-sets of selected images.
6445
6446 imageblocks3d:
6447 _maximum_elevation,_smoothness[%]>=0
6448
6449 Generate 3D blocks from selected images.
6450 Transparency of selected images is taken into account.
6451
6452 Default values: 'maximum_elevation=10' and 'smoothness=0'.
6453
6454 imagecube3d:
6455
6456 Generate 3D mapped cubes from selected images.
6457
6458 imageplane3d:
6459
6460 Generate 3D mapped planes from selected images.
6461
6462 imagepyramid3d:
6463
6464 Generate 3D mapped pyramids from selected images.
6465
6466 imagerubik3d:
6467 _xy_tiles>=1,0<=xy_shift<=100,0<=z_shift<=100
6468
6469 Generate 3D mapped rubik's cubes from selected images.
6470
6471 Default values: 'xy_tiles=3', 'xy_shift=5' and 'z_shift=5'.
6472
6473 imagesphere3d:
6474 _resolution1>=3,_resolution2>=3
6475
6476 Generate 3D mapped sphere from selected images.
6477
6478 Default values: 'resolution1=32' and 'resolutions2=16'.
6479
6480 isoline3d (+):
6481 isovalue[%] |
6482 'formula',value,_x0,_y0,_x1,_y1,_size_x>0[%],_size_y>0[%]
6483
6484 Extract 3D isolines with specified value from selected images
6485 or from specified formula.
6486
6487 Default values: 'x0=y0=-3', 'x1=y1=3' and 'size_x=size_y=256'.
6488
6489 isosurface3d (+):
6490 isovalue[%] |
6491 'for‐
6492 mula',value,_x0,_y0,_z0,_x1,_y1,_z1,_size_x>0[%],_size_y>0[%],_size_z>0[%]
6493
6494 Extract 3D isosurfaces with specified value from selected
6495 images or from specified formula.
6496
6497 Default values: 'x0=y0=z0=-3', 'x1=y1=z1=3' and
6498 'size_x=size_y=size_z=32'.
6499
6500 label3d:
6501 "text",font_height>=0,_opacity,_color1,...
6502
6503 Generate 3D text label.
6504
6505 Default values: 'font_height=13', 'opacity=1' and
6506 'color=255,255,255'.
6507
6508 label_points3d:
6509 _label_size>0,_opacity
6510
6511 Add a numbered label to all vertices of selected 3D objects.
6512
6513 Default values: 'label_size=13' and 'opacity=0.8'.
6514
6515 lathe3d:
6516 _resolution>0,_smoothness[%]>=0,_max_angle>=0
6517
6518 Generate 3D object from selected binary XY-profiles.
6519
6520 Default values: 'resolution=128', 'smoothness=0.5%' and
6521 'max_angle=361'.
6522
6523 light3d (+):
6524 position_x,position_y,position_z |
6525 [texture] |
6526 (no arg)
6527
6528 Set the light coordinates or the light texture for 3D render‐
6529 ing.
6530 (eq. to 'l3d').
6531 (no arg) resets the 3D light to default.
6532
6533 line3d:
6534 x0,y0,z0,x1,y1,z1
6535
6536 Input 3D line at specified coordinates.
6537
6538 lissajous3d:
6539 resolution>1,a,A,b,B,c,C
6540
6541 Input 3D lissajous curves
6542 (x(t)=sin(a*t+A*2*pi),y(t)=sin(b*t+B*2*pi),z(t)=sin(c*t+C*2*pi)).
6543
6544 Default values: 'resolution=1024', 'a=2', 'A=0', 'b=1', 'B=0',
6545 'c=0' and 'C=0'.
6546
6547 mode3d (+):
6548 _mode
6549
6550 Set static 3D rendering mode.
6551 (eq. to 'm3d').
6552 'mode' can be { -1=bounding-box | 0=dots | 1=wireframe | 2=flat
6553 | 3=flat-shaded |
6554 4=gouraud-shaded | 5=phong-shaded }.");
6555 Bounding-box mode ('mode==-1') is active only for the interac‐
6556 tive 3D viewer.
6557
6558 Default value: 'mode=4'.
6559
6560 moded3d (+):
6561 _mode
6562
6563 Set dynamic 3D rendering mode for interactive 3D viewer.
6564 (eq. to 'md3d').
6565 'mode' can be { -1=bounding-box | 0=dots | 1=wireframe | 2=flat
6566 | 3=flat-shaded |
6567 4=gouraud-shaded | 5=phong-shaded }.
6568
6569 Default value: 'mode=-1'.
6570
6571 mul3d (+):
6572 factor |
6573 factor_x,factor_y,_factor_z
6574
6575 Scale selected 3D objects isotropically or anisotropically,
6576 with specified factors.
6577 (eq. to '*3d').
6578
6579 Default value: 'factor_z=0'.
6580
6581 normalize3d:
6582
6583 Normalize selected 3D objects to unit size.
6584 (eq. to 'n3d').
6585
6586 opacity3d (+):
6587 _opacity
6588
6589 Set opacity of selected 3D objects.
6590 (eq. to 'o3d').
6591
6592 Default value: 'opacity=1'.
6593
6594 parametric3d:
6595 _x(a,b),_y(a,b),_z(a,b),_amin,_amax,_bmin,_bmax,_res_a>0,_res_b>0,_res_x>0,
6596 _res_y>0,_res_z>0,_smoothness>=0,_isovalue>=0
6597
6598 Input 3D object from specified parametric surface
6599 (x(a,b),y(a,b),z(a,b)).
6600
6601 Default values: 'x=(2+cos(b))*sin(a)', 'y=(2+cos(b))*cos(a)',
6602 'c=sin(b)', 'amin=-pi',
6603 'amax='pi', 'bmin=-pi' and 'bmax='pi',
6604 'res_a=512', 'res_b=res_a', 'res_x=64', 'res_y=res_x',
6605 'res_z=res_y', 'smoothness=2%' and
6606 'isovalue=10%'.
6607
6608 pca_patch3d:
6609 _patch_size>0,_M>0,_N>0,_normalize_input={ 0 | 1 },_normal‐
6610 ize_output={ 0 | 1 },
6611 _lambda_xy
6612
6613 Get 3D patch-pca representation of selected images.
6614 The 3D patch-pca is estimated from M patches on the input
6615 image, and displayed as a cloud of N
6616 3D points.
6617
6618 Default values: 'patch_size=7', 'M=1000', 'N=3000', 'normal‐
6619 ize_input=1', 'normalize_output=0',
6620 and 'lambda_xy=0'.
6621
6622 plane3d:
6623 _size_x,_size_y,_nb_subdivisions_x>0,_nb_subdisivions_y>0
6624
6625 Input 3D plane at (0,0,0), with specified geometry.
6626
6627 Default values: 'size_x=1', 'size_y=size_x' and 'nb_subdivi‐
6628 sions_x=nb_subdivisions_y=24'.
6629
6630 point3d:
6631 x0,y0,z0
6632
6633 Input 3D point at specified coordinates.
6634
6635 pointcloud3d:
6636
6637 Convert selected planar or volumetric images to 3D point
6638 clouds.
6639
6640 pose3d:
6641 p1,...,p12
6642
6643 Apply 3D pose matrix to selected 3D objects.
6644
6645 primitives3d:
6646 mode
6647
6648 Convert primitives of selected 3D objects.
6649 (eq. to 'p3d').
6650 'mode' can be { 0=points | 1=outlines | 2=non-textured }.
6651
6652 projections3d:
6653 _x[%],_y[%],_z[%],_is_bounding_box={ 0 | 1 }
6654
6655 Generate 3D xy,xz,yz projection planes from specified volumet‐
6656 ric images.
6657
6658 pyramid3d:
6659 width,height
6660
6661 Input 3D pyramid at (0,0,0), with specified geometry.
6662
6663 quadrangle3d:
6664 x0,y0,z0,x1,y1,z1,x2,y2,z2,x3,y3,z3
6665
6666 Input 3D quadrangle at specified coordinates.
6667
6668 random3d:
6669 nb_points>=0
6670
6671 Input random 3D point cloud in [0,1]^3.
6672
6673 reverse3d (+):
6674
6675 Reverse primitive orientations of selected 3D objects.
6676 (eq. to 'rv3d').
6677
6678 rotate3d (+):
6679 u,v,w,angle
6680
6681 Rotate selected 3D objects around specified axis with specified
6682 angle (in deg.).
6683 (eq. to 'r3d').
6684
6685 rotation3d:
6686 u,v,w,angle
6687
6688 Input 3x3 rotation matrix with specified axis and angle (in
6689 deg).
6690
6691 sierpinski3d:
6692 _recursion_level>=0,_width,_height
6693
6694 Input 3d Sierpinski pyramid.
6695
6696 size3d:
6697
6698 Return bounding box size of the last selected 3D object.
6699
6700 skeleton3d:
6701 _metric,_frame_type={ 0=squares | 1=diamonds | 2=circles |
6702 3=auto },
6703 _skeleton_opacity,_frame_opacity,_is_frame_wireframe={ 0 | 1
6704 }
6705
6706 Build 3D skeletal structure object from 2d binary shapes
6707 located in selected images.
6708 'metric' can be { 0=chebyshev | 1=manhattan | 2=euclidean }.
6709
6710 Default values: 'metric=2', 'bones_type=3', 'skeleton_opac‐
6711 ity=1' and 'frame_opacity=0.1'.
6712
6713 snapshot3d:
6714 _size>0,_zoom>=0,_backgroundR,_backgroundG,_backgroundB,_back‐
6715 groundA |
6716 [background_image],zoom>=0
6717
6718 Take 2d snapshots of selected 3D objects.
6719 Set 'zoom' to 0 to disable object auto-scaling.
6720
6721 Default values: 'size=512', 'zoom=1' and '[back‐
6722 ground_image]=(default)'.
6723
6724 specl3d (+):
6725 value>=0
6726
6727 Set lightness of 3D specular light.
6728 (eq. to 'sl3d').
6729
6730 Default value: 'value=0.15'.
6731
6732 specs3d (+):
6733 value>=0
6734
6735 Set shininess of 3D specular light.
6736 (eq. to 'ss3d').
6737
6738 Default value: 'value=0.8'.
6739
6740 sphere3d (+):
6741 radius,_nb_recursions>=0
6742
6743 Input 3D sphere at (0,0,0), with specified geometry.
6744
6745 Default value: 'nb_recursions=3'.
6746
6747 spherical3d:
6748 _nb_azimuth>=3,_nb_zenith>=3,_radius_function(phi,theta)
6749
6750 Input 3D spherical object at (0,0,0), with specified geometry.
6751
6752 Default values: 'nb_zenith=nb_azimut=64' and 'radius_func‐
6753 tion="abs(1+0.5*cos(3*phi)*sin(4*
6754 theta))"'.
6755
6756 spline3d:
6757 x0[%],y0[%],z0[%],u0[%],v0[%],w0[%],x1[%],y1[%],z1[%],u1[%],v1[%],w1[%],
6758 _nb_vertices>=2
6759
6760 Input 3D spline with specified geometry.
6761
6762 Default values: 'nb_vertices=128'.
6763
6764 split3d (+):
6765 _keep_shared_data={ 0 | 1 }
6766
6767 Split selected 3D objects into 6 feature vectors :
6768 { header, sizes, vertices, primitives, colors, opacities }.
6769 (eq. to 's3d').
6770 To recreate the 3D object, append these 6 images along the y-
6771 axis.
6772
6773 Default value: 'keep_shared_data=1'.
6774
6775 sprite3d:
6776
6777 Convert selected images as 3D sprites.
6778 Selected images with alpha channels are managed.
6779
6780 sprites3d:
6781 [sprite],_sprite_has_alpha_channel={ 0 | 1 }
6782
6783 Convert selected 3D objects as a sprite cloud.
6784 Set 'sprite_has_alpha_channel' to 1 to make the last channel of
6785 the selected sprite be a
6786 transparency mask.
6787
6788 Default value: 'mask_has_alpha_channel=0'.
6789
6790 star3d:
6791 _nb_branches>0,0<=_thickness<=1
6792
6793 Input 3D star at (0,0,0), with specified geometry.
6794
6795 Default values: 'nb_branches=5' and 'thickness=0.38'.
6796
6797 streamline3d (+):
6798 x[%],y[%],z[%],_L>=0,_dl>0,_interpolation,_is_backward={ 0 | 1
6799 },_is_oriented={ 0 | 1 } |
6800 'formula',x,y,z,_L>=0,_dl>0,_interpolation,_is_backward={ 0 | 1
6801 },
6802 _is_oriented={ 0 | 1 }
6803
6804 Extract 3D streamlines from selected vector fields or from
6805 specified formula.
6806 'interpolation' can be { 0=nearest integer | 1=1st-order |
6807 2=2nd-order | 3=4th-order }.
6808
6809 Default values: 'dl=0.1', 'interpolation=2', 'is_backward=0'
6810 and 'is_oriented=0'.
6811
6812 sub3d (+):
6813 tx,_ty,_tz
6814
6815 Shift selected 3D objects with the opposite of specified dis‐
6816 placement vector.
6817 (eq. to '3d').
6818
6819 Default values: 'ty=tz=0'.
6820
6821 superformula3d:
6822 resolution>1,m>=1,n1,n2,n3
6823
6824 Input 2D superformula curve as a 3D object.
6825
6826 Default values: 'resolution=1024', 'm=8', 'n1=1', 'n2=5' and
6827 'n3=8'.
6828
6829 tensors3d:
6830 _radius_factor>=0,_shape={ 0=box | >=N=ellipsoid
6831 },_radius_min>=0
6832
6833 Generate 3D tensor fields from selected images.
6834 when 'shape'>0, it gives the ellipsoid shape precision.
6835
6836 Default values: 'radius_factor=1', 'shape=2' and
6837 'radius_min=0.05'.
6838
6839 text_pointcloud3d:
6840 _"text1",_"text2",_smoothness
6841
6842 Input 3D text pointcloud from the two specified strings.
6843
6844 Default values: 'text1="text1"', 'text2="text2"' and 'smooth‐
6845 ness=1'.
6846
6847 text3d:
6848 text,_font_height>0,_depth>0,_smoothness
6849
6850 Input a 3D text object from specified text.
6851
6852 Default values: 'font_height=53', 'depth=10' and 'smooth‐
6853 ness=1.5'.
6854
6855 texturize3d:
6856 [ind_texture],_[ind_coords]
6857
6858 Texturize selected 3D objects with specified texture and coor‐
6859 dinates.
6860 (eq. to 't3d').
6861 When '[ind_coords]' is omitted, default XY texture projection
6862 is performed.
6863
6864 Default value: 'ind_coords=(undefined)'.
6865
6866 torus3d:
6867 _radius1,_radius2,_nb_subdivisions1>2,_nb_subdivisions2>2
6868
6869 Input 3D torus at (0,0,0), with specified geometry.
6870
6871 Default values: 'radius1=1', 'radius2=0.3', 'nb_subdivi‐
6872 sions1=24' and 'nb_subdivisions2=12'.
6873
6874 triangle3d:
6875 x0,y0,z0,x1,y1,z1,x2,y2,z2
6876
6877 Input 3D triangle at specified coordinates.
6878
6879 volume3d:
6880
6881 Transform selected 3D volumetric images as 3D parallelepipedic
6882 objects.
6883
6884 weird3d:
6885 _resolution>0
6886
6887 Input 3D weird object at (0,0,0), with specified resolution.
6888
6889 Default value: 'resolution=32'.
6890
6891 ** Control Flow:
6892
6893 apply_parallel:
6894 "command"
6895
6896 Apply specified command on each of the selected images, by par‐
6897 allelizing it for all image of the list.
6898 (eq. to 'ap').
6899
6900 apply_parallel_channels:
6901 "command"
6902
6903 Apply specified command on each of the selected images, by par‐
6904 allelizing it for all channel
6905 of the images independently.
6906 (eq. to 'apc').
6907
6908 apply_parallel_overlap:
6909 "command",overlap[%],nb_threads={ 0=auto | 1 | 2 | 4 | 8 | 16 }
6910
6911 Apply specified command on each of the selected images, by par‐
6912 allelizing it on 'nb_threads'
6913 overlapped sub-images.
6914 (eq. to 'apo').
6915 'nb_threads' must be a power of 2.
6916
6917 Default values: 'overlap=0','nb_threads=0'.
6918
6919 apply_tiles:
6920 "command",_tile_width[%]>0,_tile_height[%]>0,_tile_depth[%]>0,
6921 _overlap_width[%]>=0,_overlap_height[%]>=0,_over‐
6922 lap_depth[%]>=0,
6923 _boundary_conditions={ 0=dirichlet | 1=neumann | 2=periodic |
6924 3=mirror }
6925
6926 Apply specified command on each tile (neighborhood) of the
6927 selected images, eventually with
6928 overlapping tiles.
6929 (eq. to 'at').
6930
6931 Default values: 'tile_width=tile_height=tile_depth=10%',
6932 'overlap_width=overlap_height=overlap_depth=0' and 'bound‐
6933 ary_conditions=1'.
6934
6935 apply_timeout:
6936 "command",_timeout={ 0=no timeout | >0=with specified timeout
6937 (in seconds) }
6938
6939 Apply a command with a timeout.
6940
6941 check (+):
6942 condition
6943
6944 Evaluate specified condition and display an error message if
6945 evaluated to false.
6946 If 'expression' is not a math expression, it is regarded as a
6947 filename and checked if it exists.
6948
6949 check3d (+):
6950 _is_full_check={ 0 | 1 }
6951
6952 Check validity of selected 3D vector objects, and display an
6953 error message
6954 if one of the selected images is not a valid 3D vector object.
6955 Full 3D object check is slower but more precise.
6956
6957 Default value: 'is_full_check=1'.
6958
6959 check_display:
6960
6961 Check if a display is available, and throw an error otherwise.
6962
6963 continue (+):
6964
6965 Go to end of current 'repeat...done', 'do...while' or
6966 'local...endlocal' block.
6967
6968 break (+):
6969
6970 Break current 'repeat...done', 'do...while' or 'local...endlo‐
6971 cal' block.
6972
6973 do (+):
6974
6975 Start a 'do...while' block.
6976
6977 done (+):
6978
6979 End a 'repeat/for...done' block, and go to associated
6980 'repeat/for' position, if iterations remain.
6981
6982 elif (+):
6983 condition
6984
6985 Start a 'elif...[else]...fi' block if previous 'if' was not
6986 verified
6987 and test if specified condition is true, or if specified file‐
6988 name exists.
6989 'boolean' can be a float number standing for { 0=false |
6990 other=true }.
6991
6992 else (+):
6993
6994 Execute following commands if previous 'if' or 'elif' condi‐
6995 tions failed.
6996
6997 endif (+):
6998
6999 End a 'if...[elif]...[else]...endif' block.
7000 (eq. to 'fi').
7001
7002 endlocal (+):
7003
7004 End a 'local...endlocal' block.
7005 (eq. to 'endl').
7006
7007 error (+):
7008 message
7009
7010 Print specified error message on the standard error (stderr)
7011 and exit interpreter, except
7012 if error is caught by a 'onfail' command.
7013 Command selection (if any) stands for displayed call stack sub‐
7014 set instead of image indices.
7015
7016 eval (+):
7017 expression
7018
7019 Evaluate specified math expression.
7020 - If no command selection is specified, the expression is eval‐
7021 uated once and its result is set
7022 to status.
7023 - If command selection is specified, the evaluation is looped
7024 over selected images. Status is
7025 not modified.
7026 (in this latter case, 'eval' is similar to 'fill' without
7027 assigning the image values).
7028
7029 exec (+):
7030 _is_verbose={ 0 | 1 },"command"
7031
7032 Execute external command using a system call.
7033 The status value is then set to the error code returned by the
7034 system call.
7035 If 'is_verbose=1', the executed command is allowed to output on
7036 stdout/stderr.
7037 (eq. to 'x').
7038
7039 Default value: 'is_verbose=1'.
7040
7041 for (+):
7042 condition
7043
7044 Start a 'for...done' block.
7045
7046 if (+):
7047 condition
7048
7049 Start a 'if...[elif]...[else]...fi' block and test if specified
7050 condition is true,
7051 or if specified filename exists.
7052 'boolean' can be a float number standing for { 0=false |
7053 other=true }.
7054
7055 local (+):
7056
7057 Start a 'local...[onfail]...endlocal' block, with selected
7058 images.
7059 (eq. to 'l').
7060
7061 mutex (+):
7062 index,_action={ 0=unlock | 1=lock }
7063
7064 Lock or unlock specified mutex for multi-threaded programming.
7065 A locked mutex can be unlocked only by the same thread. All
7066 mutexes are unlocked by default.
7067 'index' designates the mutex index, in [0,255].
7068
7069 Default value: 'action=1'.
7070
7071 noarg (+):
7072
7073 Used in a custom command, 'noarg' tells the command that its
7074 argument list have not been used
7075 finally, and so they must be evaluated next in the G'MIC pipe‐
7076 line, just as if the custom
7077 command takes no arguments at all.
7078 Use this command to write a custom command which can decide if
7079 it takes arguments or not.
7080
7081 onfail (+):
7082
7083 Execute following commands when an error is encountered in the
7084 body of the 'local...endlocal' block.
7085 The status value is set with the corresponding error message.
7086
7087 parallel (+):
7088 _wait_threads,"command1","command2",...
7089
7090 Execute specified commands in parallel, each in a different
7091 thread.
7092 Parallel threads share the list of images.
7093 'wait_threads' can be { 0=when current environment ends |
7094 1=immediately }.
7095
7096 Default value: 'wait_threads=1'.
7097
7098 progress (+):
7099 0<=value<=100 |
7100 -1
7101
7102 Set the progress index of the current processing pipeline.
7103 This command is useful only when G'MIC is used by an embedding
7104 application.
7105
7106 quit (+):
7107
7108 Quit G'MIC interpreter.
7109 (eq. to 'q').
7110
7111 repeat (+):
7112 nb_iterations,_variable_name
7113
7114 Start iterations of a 'repeat...done' block.
7115
7116 return (+):
7117
7118 Return from current custom command.
7119
7120 rprogress:
7121 0<=value<=100 | -1 | "com‐
7122 mand",0<=value_min<=100,0<=value_max<=100
7123
7124 Set the progress index of the current processing pipeline (rel‐
7125 atively to
7126 previously defined progress bounds), or call the specified com‐
7127 mand with
7128 specified progress bounds.
7129
7130 run:
7131 "G'MIC pipeline"
7132
7133 Run specified G'MIC pipeline.
7134 This is only useful when used from a shell, e.g. to avoid shell
7135 substitutions to happen in argument.
7136
7137 skip (+):
7138 item
7139
7140 Do nothing but skip specified item.
7141
7142 status (+):
7143 status_string
7144
7145 Set the current status. Used to define a returning value from a
7146 function.
7147 (eq. to 'u').
7148
7149 while (+):
7150 condition
7151
7152 End a 'do...while' block and go back to associated 'do'
7153 if specified condition is true or if specified filename exists.
7154 'boolean' can be a float number standing for { 0=false |
7155 other=true }.
7156
7157 ** Arrays, Tiles and Frames:
7158
7159 array:
7160 M>0,_N>0,_expand_type={ 0=min | 1=max | 2=all }
7161
7162 Create MxN array from selected images.
7163
7164 Default values: 'N=M' and 'expand_type=0'.
7165
7166 array_fade:
7167 M>0,_N>0,0<=_fade_start<=100,0<=_fade_end<=100,_expand_type={0=min
7168 | 1=max | 2=all}
7169
7170 Create MxN array from selected images.
7171
7172 Default values: 'N=M', 'fade_start=60', 'fade_end=90' and
7173 'expand_type=1'.
7174
7175 array_mirror:
7176 N>=0,_dir={ 0=x | 1=y | 2=xy | 3=tri-xy },_expand_type={ 0 | 1
7177 }
7178
7179 Create 2^Nx2^N array from selected images.
7180
7181 Default values: 'dir=2' and 'expand_type=0'.
7182
7183 array_random:
7184 Ms>0,_Ns>0,_Md>0,_Nd>0
7185
7186 Create MdxNd array of tiles from selected MsxNs source arrays.
7187
7188 Default values: 'Ns=Ms', 'Md=Ms' and 'Nd=Ns'.
7189
7190 frame_blur:
7191 _sharpness>0,_size>=0,_smoothness,_shading,_blur
7192
7193 Draw RGBA-colored round frame in selected images.
7194
7195 Default values: 'sharpness=10', 'size=30', 'smoothness=0',
7196 'shading=1' and 'blur=3%'.
7197
7198 frame_cube:
7199 _depth>=0,_centering_x,_centering_y,_left_side={0=normal |
7200 1=mirror-x |
7201 2=mirror-y | 3=mirror-xy},_right_side,_lower_side,_upper_side
7202
7203 Insert 3D frames in selected images.
7204
7205 Default values: 'depth=1', 'centering_x=centering_y=0' and
7206 'left_side=right_side,
7207 lower_side=upper_side=0'.
7208
7209 frame_fuzzy:
7210 size_x[%]>=0,_size_y[%]>=0,_fuzzyness>=0,_smooth‐
7211 ness[%]>=0,_R,_G,_B,_A
7212
7213 Draw RGBA-colored fuzzy frame in selected images.
7214
7215 Default values: 'size_y=size_x', 'fuzzyness=5', 'smoothness=1'
7216 and 'R=G=B=A=255'.
7217
7218 frame_painting:
7219 _size[%]>=0,0<=_contrast<=1,_profile_smoothness[%]>=0,_R,_G,_B,
7220 _vignette_size[%]>=0,_vignette_contrast>=0,_defects_con‐
7221 trast>=0,
7222 0<=_defects_density<=100,_defects_size>=0,_defects_smooth‐
7223 ness[%]>=0,
7224 _serial_number
7225
7226 Add a painting frame to selected images.
7227
7228 Default values: 'size=10%', 'contrast=0.4', 'profile_smooth‐
7229 ness=6%', 'R=225', 'G=200', 'B=120',
7230 'vignette_size=2%', 'vignette_contrast=400', 'defects_con‐
7231 trast=50', 'defects_density=10',
7232 'defects_size=1', 'defects_smoothness=0.5%' and 'serial_num‐
7233 ber=123456789'.
7234
7235 frame_pattern:
7236 M>=3,_constrain_size={ 0 | 1 } |
7237 M>=3,_[frame_image],_constrain_size={ 0 | 1 }
7238
7239 Insert selected pattern frame in selected images.
7240
7241 Default values: 'pattern=0' and 'constrain_size=0'.
7242
7243 frame_round:
7244 _sharpness>0,_size>=0,_smoothness,_shading,_R,_G,_B,_A
7245
7246 Draw RGBA-colored round frame in selected images.
7247
7248 Default values: 'sharpness=10', 'size=10', 'smoothness=0',
7249 'shading=0' and 'R=G=B=A=255'.
7250
7251 frame_seamless:
7252 frame_size>=0,_patch_size>0,_blend_size>=0,_frame_direction={
7253 0=inner (preserve
7254 image size) | 1=outer }
7255
7256 Insert frame in selected images, so that tiling the resulting
7257 image makes less visible seams.
7258
7259 Default values: 'patch_size=7', 'blend_size=5' and
7260 'frame_direction=1'.
7261
7262 frame_x:
7263 size_x[%],_col1,...,_colN
7264
7265 Insert colored frame along the x-axis in selected images.
7266
7267 Default values: 'col1=col2=col3=255' and 'col4=255'.
7268
7269 frame_xy:
7270 size_x[%],_size_y[%],_col1,...,_colN
7271
7272 Insert colored frame along the x-axis in selected images.
7273
7274 Default values: 'size_y=size_x', 'col1=col2=col3=255' and
7275 'col4=255'.
7276 (eq. to 'frame').
7277
7278 frame_xyz:
7279 size_x[%],_size_y[%],_size_z[%]_col1,...,_colN
7280
7281 Insert colored frame along the x-axis in selected images.
7282
7283 Default values: 'size_y=size_x=size_z', 'col1=col2=col3=255'
7284 and 'col4=255'.
7285
7286 frame_y:
7287 size_y[%],_col1,...,_colN
7288
7289 Insert colored frame along the y-axis in selected images.
7290
7291 Default values: 'col1=col2=col3=255' and 'col4=255'.
7292
7293 img2ascii:
7294 _charset,_analysis_scale>0,_analysis_smoothness[%]>=0,_synthe‐
7295 sis_scale>0,
7296 _output_ascii_filename
7297
7298 Render selected images as binary ascii art.
7299 This command returns the corresponding the list of widths and
7300 heights (expressed as a number of
7301 characters)
7302 for each selected image.
7303
7304 Default values: 'charset=[ascii charset]', 'analysis_scale=16',
7305 'analysis_smoothness=20%',
7306 'synthesis_scale=16' and '_output_ascii_filename=[unde‐
7307 fined]'.
7308
7309 imagegrid:
7310 M>0,_N>0
7311
7312 Create MxN image grid from selected images.
7313
7314 Default value: 'N=M'.
7315
7316 imagegrid_hexagonal:
7317 _resolution>0,0<=_outline<=1
7318
7319 Create hexagonal grids from selected images.
7320
7321 Default values: 'resolution=32', 'outline=0.1' and
7322 'is_antialiased=1'.
7323
7324 imagegrid_triangular:
7325 pattern_width>=1,_pattern_height>=1,_pattern_type,0<=_out‐
7326 line_opacity<=1,
7327 _outline_color1,...
7328
7329 Create triangular grids from selected images.
7330 'pattern type' can be { 0=horizontal | 1=vertical | 2=crossed |
7331 3=cube | 4=decreasing |
7332 5=increasing }.
7333
7334 Default values: 'pattern_width=24', 'pattern_height=pat‐
7335 tern_width', 'pattern_type=0',
7336 'outline_opacity=0.1' and 'outline_color1=0'.
7337
7338 linearize_tiles:
7339 M>0,_N>0
7340
7341 Linearize MxN tiles on selected images.
7342
7343 Default value: 'N=M'.
7344
7345 map_sprites:
7346 _nb_sprites>=1,_allow_rotation={ 0=none | 1=90 deg. | 2=180
7347 deg. }
7348
7349 Map set of sprites (defined as the 'nb_sprites' latest images
7350 of the selection) to other
7351 selected images,
7352 according to the luminosity of their pixel values.
7353
7354 pack:
7355 is_ratio_constraint={ 0 | 1 },_sort_criterion
7356
7357 Pack selected images into a single image.
7358 The returned status contains the list of new (x,y) offsets for
7359 each input image.
7360 Parameter 'is_ratio_constraint' tells if the resulting image
7361 must tend to a square image.
7362
7363 Default values: 'is_ratio_constraint=0' and 'sort_crite‐
7364 rion=max(w,h)'.
7365
7366 puzzle:
7367 _width>0,_height>0,_M>=1,_N>=1,_curvature,_centering,_connec‐
7368 tors_variability,
7369 _resolution>=1
7370
7371 Input puzzle binary mask with specified size and geometry.
7372
7373 Default values: 'width=height=512', 'M=N=5', 'curvature=0.5',
7374 'centering=0.5',
7375 'connectors_variability=0.5' and 'resolution=64'.
7376
7377 quadratize_tiles:
7378 M>0,_N>0
7379
7380 Quadratize MxN tiles on selected images.
7381
7382 Default value: 'N=M'.
7383
7384 rotate_tiles:
7385 angle,_M>0,N>0
7386
7387 Apply MxN tiled-rotation effect on selected images.
7388
7389 Default values: 'M=8' and 'N=M'.
7390
7391 shift_tiles:
7392 M>0,_N>0,_amplitude
7393
7394 Apply MxN tiled-shift effect on selected images.
7395
7396 Default values: 'N=M' and 'amplitude=20'.
7397
7398 taquin:
7399 M>0,_N>0,_remove_tile={ 0=none | 1=first | 2=last | 3=random
7400 },_relief,
7401 _border_thickness[%],_border_outline[%],_outline_color
7402
7403 Create MxN taquin puzzle from selected images.
7404
7405 Default value: 'N=M', 'relief=50', 'border_thickness=5', 'bor‐
7406 der_outline=0' and 'remove_tile=0'.
7407
7408 tunnel:
7409 _level>=0,_factor>0,_centering_x,_centering_y,_opacity,_angle
7410
7411 Apply tunnel effect on selected images.
7412
7413 Default values: 'level=9', 'factor=80%', 'centering_x=center‐
7414 ing_y=0.5', 'opacity=1' and 'angle=0'
7415
7416 ** Artistic:
7417
7418 boxfitting:
7419 _min_box_size>=1,_max_box_size>=0,_initial_den‐
7420 sity>=0,_nb_attempts>=1
7421
7422 Apply box fitting effect on selected images, as displayed the
7423 web page:
7424 [http://www.complexification.net/gallery/machines/boxFit‐
7425 tingImg/]
7426
7427 Default values: 'min_box_size=1', 'max_box_size=0', 'ini‐
7428 tial_density=0.1' and 'nb_attempts=3'.
7429
7430 brushify:
7431 [brush],_brush_nb_sizes>=1,0<=_brush_min_size_factor<=1,
7432 _brush_nb_orienta‐
7433 tions>=1,_brush_light_type,0<=_brush_light_strength<=1,
7434 _brush_opacity,_painting_density[%]>=0,0<=_painting_con‐
7435 tours_coherence<=1,
7436 0<=_painting_orientation_coherence<=1,_painting_coher‐
7437 ence_alpha[%]>=0,
7438 _painting_coherence_sigma[%]>=0,_painting_primary_angle,
7439 0<=_painting_angle_dispersion<=1
7440
7441 Apply specified brush to create painterly versions of specified
7442 images.
7443 'brush_light_type' can be { 0=none | 1=flat | 2=darken |
7444 3=lighten | 4=full }.
7445
7446 Default values: 'brush_nb_sizes=3', 'brush_min_size_fac‐
7447 tor=0.66', 'brush_nb_orientations=12',
7448 'brush_light_type=0', 'brush_light_strength=0.25',
7449 'brush_opacity=0.8', 'painting_density=20%',
7450 'painting_contours_coherence=0.9', 'painting_orienta‐
7451 tion_coherence=0.9',
7452 'painting_coherence_alpha=1', 'painting_coherence_sigma=1',
7453 'painting_primary_angle=0',
7454 'painting_angle_dispersion=0.2'
7455
7456 cartoon:
7457 _smoothness,_sharpening,_threshold>=0,_thick‐
7458 ness>=0,_color>=0,quantization>0
7459
7460 Apply cartoon effect on selected images.
7461
7462 Default values: 'smoothness=3', 'sharpening=150', 'thresh‐
7463 old=20', 'thickness=0.25', 'color=1.5'
7464 and 'quantization=8'.
7465
7466 color_ellipses:
7467 _count>0,_radius>=0,_opacity>=0
7468
7469 Add random color ellipses to selected images.
7470
7471 Default values: 'count=400', 'radius=5' and 'opacity=0.1'.
7472
7473 cubism:
7474 _density>=0,0<=_thickness<=50,_max_angle,_opacity,_smooth‐
7475 ness>=0
7476
7477 Apply cubism effect on selected images.
7478
7479 Default values: 'density=50', 'thickness=10', 'max_angle=75',
7480 'opacity=0.7' and 'smoothness=0'.
7481
7482 draw_whirl:
7483 _amplitude>=0
7484
7485 Apply whirl drawing effect on selected images.
7486
7487 Default value: 'amplitude=100'.
7488
7489 drawing:
7490 _amplitude>=0
7491
7492 Apply drawing effect on selected images.
7493
7494 Default value: 'amplitude=200'.
7495
7496 drop_shadow:
7497 _offset_x[%],_offset_y[%],_smoothness[%]>=0,0<=_curva‐
7498 ture<=1,_expand_size={ 0 | 1 }
7499
7500 Drop shadow behind selected images.
7501
7502 Default values: 'offset_x=20', 'offset_y=offset_x', 'smooth‐
7503 ness=5', 'curvature=0' and
7504 'expand_size=1'.
7505
7506 ellipsionism:
7507 _R>0[%],_r>0[%],_smoothness>=0[%],_opacity,_outline>0,_den‐
7508 sity>0
7509
7510 Apply ellipsionism filter to selected images.
7511
7512 Default values: 'R=10', 'r=3', 'smoothness=1%', 'opacity=0.7',
7513 'outline=8' and 'density=0.6'.
7514
7515 fire_edges:
7516 _edges>=0,0<=_attenuation<=1,_smoothness>=0,_thresh‐
7517 old>=0,_nb_frames>0,
7518 _starting_frame>=0,frame_skip>=0
7519
7520 Generate fire effect from edges of selected images.
7521
7522 Default values: 'edges=0.7', 'attenuation=0.25', 'smooth‐
7523 ness=0.5', 'threshold=25',
7524 'nb_frames=1', 'starting_frame=20' and 'frame_skip=0'.
7525
7526 fractalize:
7527 0<=detail_level<=1
7528
7529 Randomly fractalize selected images.
7530
7531 Default value: 'detail_level=0.8'
7532
7533 glow:
7534 _amplitude>=0
7535
7536 Add soft glow on selected images.
7537
7538 Default value: 'amplitude=1%'.
7539
7540 halftone:
7541 nb_levels>=2,_size_dark>=2,_size_bright>=2,_shape={ 0=square |
7542 1=diamond |
7543 2=circle | 3=inv-square | 4=inv-diamond | 5=inv-circle
7544 },_smoothness[%]>=0
7545
7546 Apply halftone dithering to selected images.
7547
7548 Default values: 'nb_levels=5', 'size_dark=8', 'size_bright=8',
7549 'shape=5' and 'smoothnesss=0'.
7550
7551 hardsketchbw:
7552 _amplitude>=0,_density>=0,_opacity,0<=_edge_thresh‐
7553 old<=100,_is_fast={ 0 | 1 }
7554
7555 Apply hard B&W sketch effect on selected images.
7556
7557 Default values: 'amplitude=1000', 'sampling=3', 'opacity=0.1',
7558 'edge_threshold=20' and
7559 'is_fast=0'.
7560
7561 hearts:
7562 _density>=0
7563
7564 Apply heart effect on selected images.
7565
7566 Default value: 'density=10'.
7567
7568 houghsketchbw:
7569 _density>=0,_radius>0,0<=_threshold<=100,0<=_opacity<=1,_vote‐
7570 size[%]>0
7571
7572 Apply hough B&W sketch effect on selected images.
7573
7574 Default values: 'density=8', 'radius=5', 'threshold=80', 'opac‐
7575 ity=0.1' and 'votesize=100%'.
7576
7577 lightrays:
7578 100<=_density<=0,_center_x[%],_cen‐
7579 ter_y[%],_ray_length>=0,_ray_attenuation>=0
7580
7581 Generate ray lights from the edges of selected images.
7582 Defaults values : 'density=50%', 'center_x=50%', 'cen‐
7583 ter_y=50%', 'ray_length=0.9' and
7584 'ray_attenuation=0.5'.
7585
7586 light_relief:
7587 _ambient_light,_specular_lightness,_specu‐
7588 lar_size,_light_smoothness,_darkness,
7589 _xl,_yl,_zl,_zscale,_opacity_is_heightmap={ 0 | 1 }
7590
7591 Apply relief light to selected images.
7592 Default values(s) : 'ambient_light=0.3', 'specular_light‐
7593 ness=0.5', 'specular_size=0.2',
7594 'darkness=0', 'xl=0.2', 'yl=zl=0.5',
7595 'zscale=1', 'opacity=1' and 'opacity_is_heightmap=0'.
7596
7597 linify:
7598 0<=_density<=100,_spreading>=0,_resolution[%]>0,_line_opac‐
7599 ity>=0,
7600 _line_precision>0,_mode={ 0=subtractive | 1=additive }
7601
7602 Apply linify effect on selected images.
7603 The algorithm is inspired from the one described on the webpage
7604 'http://linify.me/about'.
7605
7606 Default values: 'density=50', 'spreading=2', 'resolution=40%',
7607 'line_opacity=10',
7608 'line_precision=24' and 'mode=0'.
7609
7610 mosaic:
7611 0<=_density<=100
7612
7613 Create random mosaic from selected images.
7614
7615 Default values: 'density=30'.
7616
7617 old_photo:
7618
7619 Apply old photo effect on selected images.
7620
7621 pencilbw:
7622 _size>=0,_amplitude>=0
7623
7624 Apply B&W pencil effect on selected images.
7625
7626 Default values: 'size=0.3' and 'amplitude=60'.
7627
7628 pixelsort:
7629 _ordering={ + | - },_axis={ x | y | z | xy | yx },_[sort‐
7630 ing_criterion],_[mask]
7631
7632 Apply a 'pixel sorting' algorithm on selected images, as
7633 described in the page :
7634 http://satyarth.me/articles/pixel-sorting/
7635
7636 Default values: 'ordering=+', 'axis=x' and 'sorting_crite‐
7637 rion=mask=(undefined)'.
7638
7639 polaroid:
7640 _size1>=0,_size2>=0
7641
7642 Create polaroid effect in selected images.
7643
7644 Default values: 'size1=10' and 'size2=20'.
7645
7646 polygonize:
7647 _warp_amplitude>=0,_smoothness[%]>=0,_min_area[%]>=0,_resolu‐
7648 tion_x[%]>0,
7649 _resolution_y[%]>0
7650
7651 Apply polygon effect on selected images.
7652
7653 Default values: 'warp_amplitude=300', 'smoothness=2%',
7654 'min_area=0.1%',
7655 'resolution_x=resolution_y=10%'.
7656
7657 poster_edges:
7658 0<=_edge_threshold<=100,0<=_edge_shade<=100,_edge_thickness>=0,
7659 _edge_antialiasing>=0,0<=_posterization_level<=15,_posteriza‐
7660 tion_antialiasing>=0
7661
7662 Apply poster edges effect on selected images.
7663
7664 Default values: 'edge_threshold=40', 'edge_shade=5',
7665 'edge_thickness=0.5',
7666 'edge_antialiasing=10', 'posterization_level=12' and 'poster‐
7667 ization_antialiasing=0'.
7668
7669 poster_hope:
7670 _smoothness>=0
7671
7672 Apply Hope stencil poster effect on selected images.
7673
7674 Default value: 'smoothness=3'.
7675
7676 rodilius:
7677 0<=_amplitude<=100,_0<=thickness<=100,_sharpness>=0,_nb_orien‐
7678 tations>0,_offset,
7679 _color_mode={ 0=darker | 1=brighter }
7680
7681 Apply rodilius (fractalius-like) filter on selected images.
7682
7683 Default values: 'amplitude=10', 'thickness=10', 'sharp‐
7684 ness=400', 'nb_orientations=7',
7685 'offset=0' and 'color_mode=1'.
7686
7687 stained_glass:
7688 _edges[%]>=0, shading>=0, is_thin_separators={ 0 | 1 }
7689
7690 Generate stained glass from selected images.
7691
7692 Default values: 'edges=40%', 'shading=0.2' and 'is_precise=0'.
7693
7694 stars:
7695 _density[%]>=0,_depth>=0,_size>0,_nb_branches>=1,0<=_thick‐
7696 ness<=1,
7697 _smoothness[%]>=0,_R,_G,_B,_opacity
7698
7699 Add random stars to selected images.
7700
7701 Default values: 'density=10%', 'depth=1', 'size=32',
7702 'nb_branches=5', 'thickness=0.38',
7703 'smoothness=0.5', 'R=G=B=200' and 'opacity=1'.
7704
7705 sketchbw:
7706 _nb_angles>0,_start_angle,_angle_range>=0,_length>=0,_thresh‐
7707 old>=0,_opacity,
7708 _bgfactor>=0,_density>0,_sharpness>=0,_anisotropy>=0,_smooth‐
7709 ness>=0,
7710 _coherence>=0,_is_boost={ 0 | 1 },_is_curved={ 0 | 1 }
7711
7712 Apply sketch effect to selected images.
7713
7714 Default values: 'nb_angles=2', 'start_angle=45',
7715 'angle_range=180', 'length=30', 'threshold=3',
7716 'opacity=0.03', 'bgfactor=0', 'density=0.6', 'sharpness=0.1',
7717 'anisotropy=0.6', 'smoothness=0.
7718 25', 'coherence=1', 'is_boost=0' and 'is_curved=1'.
7719
7720 sponge:
7721 _size>0
7722
7723 Apply sponge effect on selected images.
7724
7725 Default value: 'size=13'.
7726
7727 stencil:
7728 _radius[%]>=0,_smoothness>=0,_iterations>=0
7729
7730 Apply stencil filter on selected images.
7731
7732 Default values: 'radius=3', 'smoothness=1' and 'iterations=8'.
7733
7734 stencilbw:
7735 _edges>=0,_smoothness>=0
7736
7737 Apply B&W stencil effect on selected images.
7738
7739 Default values: 'edges=15' and 'smoothness=10'.
7740
7741 tetris:
7742 _scale>0
7743
7744 Apply tetris effect on selected images.
7745
7746 Default value: 'scale=10'.
7747
7748 warhol:
7749 _M>0,_N>0,_smoothness>=0,_color>=0
7750
7751 Create MxN Andy Warhol-like artwork from selected images.
7752
7753 Default values: 'M=3', 'N=M', 'smoothness=2' and 'color=20'.
7754
7755 weave:
7756 _density>=0,0<=_thickness<=100,0<=_shadow<=100,_shad‐
7757 ing>=0,_fibers_amplitude>=0,
7758 _fibers_smoothness>=0,_angle,-1<=_x_curvature<=1,-1<=_y_cur‐
7759 vature<=1
7760
7761 Apply weave effect to the selected images.
7762 'angle' can be { 0=0 deg. | 1=22.5 deg. | 2=45 deg. | 3=67.5
7763 deg. }.
7764
7765 Default values: 'density=6', 'thickness=65', 'shadow=40',
7766 'shading=0.5', 'fibers_amplitude=0', _
7767
7768 whirls:
7769 _texture>=0,_smoothness>=0,_darkness>=0,_lightness>=0
7770
7771 Add random whirl texture to selected images.
7772
7773 Default values: 'texture=3', 'smoothness=6', 'darkness=0.5' and
7774 'lightness=1.8'.
7775
7776 ** Warpings:
7777
7778 deform:
7779 _amplitude>=0,_interpolation
7780
7781 Apply random smooth deformation on selected images.
7782 'interpolation' can be { 0=none | 1=linear | 2=bicubic }.
7783
7784 Default value: 'amplitude=10'.
7785
7786 euclidean2polar:
7787 _center_x[%],_center_y[%],_stretch_factor>0,_boundary_condi‐
7788 tions={ 0=dirichlet |
7789 1=neumann | 2=periodic | 3=mirror }
7790
7791 Apply euclidean to polar transform on selected images.
7792
7793 Default values: 'center_x=center_y=50%', 'stretch_factor=1' and
7794 'boundary_conditions=1'.
7795
7796 equirectangular2nadirzenith:
7797
7798 Transform selected equirectangular images to nadir/zenith rec‐
7799 tilinear projections.
7800
7801 fisheye:
7802 _center_x,_center_y,0<=_radius<=100,_amplitude>=0
7803
7804 Apply fish-eye deformation on selected images.
7805
7806 Default values: 'x=y=50', 'radius=50' and 'amplitude=1.2'.
7807
7808 flower:
7809 _amplitude,_frequency,_offset_r[%],_angle,_center_x[%],_cen‐
7810 ter_y[%],
7811 _boundary_conditions={ 0=dirichlet | 1=neumann | 2=periodic |
7812 3=mirror}
7813
7814 Apply flower deformation on selected images.
7815
7816 Default values: 'amplitude=30', 'frequency=6', 'offset_r=0',
7817 'angle=0', 'center_x=center_y=50%'
7818 and 'boundary_conditions=3'.
7819
7820 kaleidoscope:
7821 _center_x[%],_center_y[%],_radius,_angle,_boundary_conditions={
7822 0=dirichlet |
7823 1=neumann | 2=periodic | 3=mirror }
7824
7825 Create kaleidoscope effect from selected images.
7826
7827 Default values: 'center_x=center_y=50%', 'radius=100',
7828 'angle=30' and 'boundary_conditions=3'.
7829
7830 map_sphere:
7831 _width>0,_height>0,_radius,_dilation>0,_fading>=0,_fad‐
7832 ing_power>=0
7833
7834 Map selected images on a sphere.
7835
7836 Default values: 'width=height=512', 'radius=100', 'dila‐
7837 tion=0.5', 'fading=0' and
7838 'fading_power=0.5'.
7839
7840 nadirzenith2equirectangular:
7841
7842 Transform selected nadir/zenith rectilinear projections to
7843 equirectangular images.
7844
7845 polar2euclidean:
7846 _center_x[%],_center_y[%],_stretch_factor>0,_boundary_condi‐
7847 tions={ 0=dirichlet |
7848 1=neumann | 2=periodic | 3=mirror }
7849
7850 Apply euclidean to polar transform on selected images.
7851
7852 Default values: 'center_x=center_y=50%', 'stretch_factor=1' and
7853 'boundary_conditions=1'.
7854
7855 raindrops:
7856 _amplitude,_density>=0,_wavelength>=0,_merging_steps>=0
7857
7858 Apply raindrops deformation on selected images.
7859
7860 Default values: 'amplitude=80','density=0.1', 'wavelength=1'
7861 and 'merging_steps=0'.
7862
7863 ripple:
7864 _amplitude,_bandwidth,_shape={ 0=bloc | 1=triangle | 2=sine |
7865 3=sine+ |
7866 4=random },_angle,_offset
7867
7868 Apply ripple deformation on selected images.
7869
7870 Default values: 'amplitude=10', 'bandwidth=10', 'shape=2',
7871 'angle=0' and 'offset=0'.
7872
7873 rotoidoscope:
7874 _center_x[%],_center_y[%],_tiles>0,_smoothness[%]>=0,_bound‐
7875 ary_conditions={
7876 0=dirichlet | 1=neumann | 2=periodic | 3=mirror }
7877
7878 Create rotational kaleidoscope effect from selected images.
7879
7880 Default values: 'center_x=center_y=50%', 'tiles=10', 'smooth‐
7881 ness=1' and 'boundary_conditions=3'.
7882
7883 spherize:
7884 _radius[%]>=0,_strength,_smoothness[%]>=0,_center_x[%],_cen‐
7885 ter_y[%],_ratio_x/
7886 y>0,_angle,_interpolation
7887
7888 Apply spherize effect on selected images.
7889
7890 Default values: 'radius=50%', 'strength=1', 'smoothness=0',
7891 'center_x=center_y=50%', 'ratio_x/
7892 y=1', 'angle=0' and 'interpolation=1'.
7893
7894 symmetrize:
7895 _x[%],_y[%],_angle,_boundary_conditions={ 0=dirichlet | 1=neu‐
7896 mann | 2=periodic |
7897 3=mirror },_is_antisymmetry={ 0 | 1 },_swap_sides={ 0 | 1 }
7898
7899 Symmetrize selected images regarding specified axis.
7900
7901 Default values: 'x=y=50%', 'angle=90', 'boundary_conditions=3',
7902 'is_antisymmetry=0' and
7903 'swap_sides=0'.
7904
7905 transform_polar:
7906 "expr_radius",_"expr_angle",_center_x[%],_center_y[%],_bound‐
7907 ary_conditions={
7908 0=dirichlet | 1=neumann }
7909
7910 Apply user-defined transform on polar representation of
7911 selected images.
7912
7913 Default values: 'expr_radius=R-r', 'expr_rangle=a', 'cen‐
7914 ter_x=center_y=50%' and
7915 'boundary_conditions=1'.
7916
7917 twirl:
7918 _amplitude,_center_x[%],_center_y[%],_boundary_conditions={
7919 0=dirichlet |
7920 1=neumann | 2=periodic | 3=mirror }
7921
7922 Apply twirl deformation on selected images.
7923
7924 Default values: 'amplitude=1', 'center_x=center_y=50%' and
7925 'boundary_conditions=3'.
7926
7927 warp_perspective:
7928 _x-angle,_y-angle,_zoom>0,_x-center,_y-center,_boundary_condi‐
7929 tions={
7930 0=dirichlet | 1=neumann | 2=periodic | 3=mirror }
7931
7932 Warp selected images with perspective deformation.
7933
7934 Default values: 'x-angle=1.5', 'y-angle=0', 'zoom=1', 'x-cen‐
7935 ter=y-center=50' and
7936 'boundary_conditions=2'.
7937
7938 water:
7939 _amplitude,_smoothness>=0,_angle
7940
7941 Apply water deformation on selected images.
7942
7943 Default values: 'amplitude=30', 'smoothness=1.5' and
7944 'angle=45'.
7945
7946 wave:
7947 _amplitude>=0,_frequency>=0,_center_x,_center_y
7948
7949 Apply wave deformation on selected images.
7950
7951 Default values: 'amplitude=4', 'frequency=0.4' and 'cen‐
7952 ter_x=center_y=50'.
7953
7954 wind:
7955 _amplitude>=0,_angle,0<=_attenuation<=1,_threshold
7956
7957 Apply wind effect on selected images.
7958
7959 Default values: 'amplitude=20', 'angle=0', 'attenuation=0.7'
7960 and 'threshold=20'.
7961
7962 zoom:
7963 _factor,_cx,_cy,_cz,_boundary_conditions={ 0=dirichlet | 1=neu‐
7964 mann | 2=periodic
7965 | 3=mirror }
7966
7967 Apply zoom factor to selected images.
7968
7969 Default values: 'factor=1', 'cx=cy=cz=0.5' and 'boundary_condi‐
7970 tions=0'.
7971
7972 ** Degradations:
7973
7974 cracks:
7975 0<=_density<=100,_is_relief={ 0 | 1 },_opacity,_color1,...
7976
7977 Draw random cracks on selected images with specified color.
7978
7979 Default values: 'density=25', 'is_relief=0', 'opacity=1' and
7980 'color1=0'.
7981
7982 light_patch:
7983 _density>0,_darkness>=0,_lightness>=0
7984
7985 Add light patches to selected images.
7986
7987 Default values: 'density=10', 'darkness=0.9' and 'light‐
7988 ness=1.7'.
7989
7990 noise_hurl:
7991 _amplitude>=0
7992
7993 Add hurl noise to selected images.
7994
7995 Default value: 'amplitude=10'.
7996
7997 pixelize:
7998 _scale_x>0,_scale_y>0,_scale_z>0
7999
8000 Pixelize selected images with specified scales.
8001
8002 Default values: 'scale_x=20' and 'scale_y=scale_z=scale_x'.
8003
8004 scanlines:
8005 _amplitude,_bandwidth,_shape={ 0=bloc | 1=triangle | 2=sine |
8006 3=sine+ |
8007 4=random },_angle,_offset
8008
8009 Apply ripple deformation on selected images.
8010
8011 Default values: 'amplitude=60', 'bandwidth=2', 'shape=0',
8012 'angle=0' and 'offset=0'.
8013
8014 shade_stripes:
8015 _frequency>=0,_direction={ 0=horizontal | 1=vertical },_dark‐
8016 ness>=0,
8017 _lightness>=0
8018
8019 Add shade stripes to selected images.
8020
8021 Default values: 'frequency=5', 'direction=1', 'darkness=0.8'
8022 and 'lightness=2'.
8023
8024 shadow_patch:
8025 _opacity>=0
8026
8027 Add shadow patches to selected images.
8028
8029 Default value: 'opacity=0.7'.
8030
8031 spread:
8032 _dx>=0,_dy>=0,_dz>=0
8033
8034 Spread pixel values of selected images randomly along x,y and
8035 z.
8036
8037 Default values: 'dx=3', 'dy=dx' and 'dz=0'.
8038
8039 stripes_y:
8040 _frequency>=0
8041
8042 Add vertical stripes to selected images.
8043
8044 Default value: 'frequency=10'.
8045
8046 texturize_canvas:
8047 _amplitude>=0,_fibrousness>=0,_emboss_level>=0
8048
8049 Add paint canvas texture to selected images.
8050
8051 Default values: 'amplitude=20', 'fibrousness=3' and
8052 'emboss_level=0.6'.
8053
8054 texturize_paper:
8055
8056 Add paper texture to selected images.
8057
8058 vignette:
8059 _strength>=0,0<=_radius_min<=100,0<=_radius_max<=100
8060
8061 Add vignette effect to selected images.
8062
8063 Default values: 'strength=100', 'radius_min=70' and
8064 'radius_max=90'.
8065
8066 watermark_visible:
8067 _text,0<_opacity<1,_size>0,_angle,_mode={ 0=remove | 1=add
8068 },_smoothness>=0
8069
8070 Add or remove a visible watermark on selected images (value
8071 range must be [0,255]).
8072
8073 Default values: 'text=(c) G'MIC', 'opacity=0.3', 'size=53',
8074 'angle=25', 'mode=1' and
8075 'smoothness=0'.
8076
8077 ** Blending and Fading:
8078
8079 blend:
8080 [layer],blending_mode,_opacity[%],_selection_is={ 0=base-layers
8081 | 1=top-layers } |
8082 blending_mode,_opacity[%]
8083
8084 Blend selected G,GA,RGB or RGBA images by specified layer or
8085 blend all selected images together,
8086 using specified blending mode.
8087 'blending_mode' can be { add | alpha | and | average | blue |
8088 burn | darken | difference |
8089 divide | dodge | edges | exclusion | freeze | grainextract |
8090 grainmerge | green | hardlight |
8091 hardmix | hue | interpolation | lighten | lightness | linear‐
8092 burn | linearlight | luminance |
8093 multiply | negation | or | overlay | pinlight | red | reflect |
8094 saturation | seamless |
8095 seamless_mixed |
8096 screen | shapeareamax | shapeareamax0 | shapeareamin | sha‐
8097 peareamin0 | shapeaverage |
8098 shapeaverage0 |
8099 shapemedian | shapemedian0 | shapemin | shapemin0 | shapemax |
8100 shapemax0 | softburn | softdodge |
8101 softlight | stamp | subtract | value | vividlight | xor }.
8102 'opacity' should be in '[0,1]', or '[0,100]' if expressed with
8103 a '%'.
8104
8105 Default values: 'blending_mode=alpha', 'opacity=1' and 'selec‐
8106 tion_is=0'.
8107
8108 blend_edges:
8109 smoothness[%]>=0
8110
8111 Blend selected images togethers using 'edges' mode.
8112
8113 blend_fade:
8114 [fading_shape]
8115
8116 Blend selected images together using specified fading shape.
8117
8118 blend_median:
8119
8120 Blend selected images together using 'median' mode.
8121
8122 blend_seamless:
8123 _is_mixed_mode={ 0 | 1 },_inner_fading[%]>=0,_outer_fad‐
8124 ing[%]>=0
8125
8126 Blend selected images using a seamless blending mode (Poisson-
8127 based).
8128
8129 Default values: 'is_mixed=0', 'inner_fading=0' and 'outer_fad‐
8130 ing=100%'.
8131
8132 fade_diamond:
8133 0<=_start<=100,0<=_end<=100
8134
8135 Create diamond fading from selected images.
8136
8137 Default values: 'start=80' and 'end=90'.
8138
8139 fade_linear:
8140 _angle,0<=_start<=100,0<=_end<=100
8141
8142 Create linear fading from selected images.
8143
8144 Default values: 'angle=45', 'start=30' and 'end=70'.
8145
8146 fade_radial:
8147 0<=_start<=100,0<=_end<=100
8148
8149 Create radial fading from selected images.
8150
8151 Default values: 'start=30' and 'end=70'.
8152
8153 fade_x:
8154 0<=_start<=100,0<=_end<=100
8155
8156 Create horizontal fading from selected images.
8157
8158 Default values: 'start=30' and 'end=70'.
8159
8160 fade_y:
8161 0<=_start<=100,0<=_end<=100
8162
8163 Create vertical fading from selected images.
8164
8165 Default values: 'start=30' and 'end=70'.
8166
8167 fade_z:
8168 0<=_start<=100,0<=_end<=100
8169
8170 Create transversal fading from selected images.
8171
8172 Default values: 'start=30' and 'end=70'.
8173
8174 sub_alpha:
8175 [base_image],_opacity_gain>=1
8176
8177 Compute the minimal alpha-channel difference (opposite of alpha
8178 blending) between the selected images
8179 and the specified base image.
8180 The alpha difference A-B is defined as the image having minimal
8181 opacity, such that
8182 alpha_blend(B,A-B) = A.
8183
8184 Default value: 'opacity_gain=1'.
8185
8186 ** Image Sequences and Videos:
8187
8188 animate:
8189 fil‐
8190 ter_name,"param1_start,...,paramN_start","param1_end,...,paramN_end",
8191 nb_frames>=0,_output_frames={ 0 | 1 },_output_filename |
8192 delay>0,_back and forth={ 0 | 1 }
8193
8194 Animate filter from starting parameters to ending parameters or
8195 animate selected images
8196 in a display window.
8197
8198 Default value: 'delay=30'.
8199
8200 apply_camera:
8201 _"command",_camera_index>=0,_skip_frames>=0,_output_filename
8202
8203 Apply specified command on live camera stream, and display it
8204 on display window [0].
8205
8206 Default values: 'command=""', 'camera_index=0' (default cam‐
8207 era), 'skip_frames=0' and
8208 'output_filename=""'.
8209
8210 apply_files:
8211 "filename_pattern",_"command",_first_frame>=0,_last_frame={ >=0
8212 | -1=last },
8213 _frame_step>=1,_output_filename
8214
8215 Apply a G'MIC command on specified input image files, in a
8216 streamed way.
8217 If a display window is opened, rendered frames are displayed in
8218 it during processing.
8219 The output filename may have extension '.avi' (saved as a
8220 video), or any other usual image file
8221 extension (saved as a sequence of images).
8222
8223 Default values: 'command=(undefined)', 'first_frame=0',
8224 'last_frame=-1', 'frame_step=1' and
8225 'output_filename=(undefined)'.
8226
8227 apply_video:
8228 video_filename,_"command",_first_frame>=0,_last_frame={ >=0 |
8229 -1=last },
8230 _frame_step>=1,_output_filename
8231
8232 Apply a G'MIC command on all frames of the specified input
8233 video file, in a streamed way.
8234 If a display window is opened, rendered frames are displayed in
8235 it during processing.
8236 The output filename may have extension '.avi' (saved as a
8237 video), or any other usual image
8238 file extension (saved as a sequence of images).
8239
8240 Default values: 'first_frame=0', 'last_frame=-1',
8241 'frame_step=1' and
8242 'output_filename=(undefined)'.
8243
8244 average_files:
8245 "filename_pattern",_first_frame>=0,_last_frame={ >=0 | -1=last
8246 },_frame_step>=1,
8247 _output_filename
8248
8249 Average specified input image files, in a streamed way.
8250 If a display window is opened, rendered frames are displayed in
8251 it during processing.
8252 The output filename may have extension '.avi' (saved as a
8253 video), or any other usual image
8254 file extension (saved as a sequence of images).
8255
8256 Default values: 'first_frame=0', 'last_frame=-1',
8257 'frame_step=1' and
8258 'output_filename=(undefined)'.
8259
8260 average_video:
8261 video_filename,_first_frame>=0,_last_frame={ >=0 | -1=last
8262 },_frame_step>=1,
8263 _output_filename
8264
8265 Average frames of specified input video file, in a streamed
8266 way.
8267 If a display window is opened, rendered frames are displayed in
8268 it during processing.
8269 The output filename may have extension '.avi' (saved as a
8270 video), or any other usual image
8271 file extension (saved as a sequence of images).
8272
8273 Default values: 'first_frame=0', 'last_frame=-1',
8274 'frame_step=1' and
8275 'output_filename=(undefined)'.
8276
8277 fade_files:
8278 "filename_pat‐
8279 tern",_nb_inner_frames>0,_first_frame>=0,_last_frame={ >=0 |
8280 -1=last },_frame_step>=1,_output_filename
8281
8282 Generate a temporal fading from specified input image files, in
8283 a streamed way.
8284 If a display window is opened, rendered frames are displayed in
8285 it during processing.
8286 The output filename may have extension 'avi' (saved as a
8287 video), or any other usual image
8288 file extension (saved as a sequence of images).
8289
8290 Default values: 'nb_inner_frames=10', 'first_frame=0',
8291 'last_frame=-1', 'frame_step=1' and
8292 'output_filename=(undefined)'.
8293
8294 fade_video:
8295 video_filename,_nb_inner_frames>0,_first_frame>=0,_last_frame={
8296 >=0 | -1=last },
8297 _frame_step>=1,_output_filename
8298
8299 Create a temporal fading sequence from specified input video
8300 file, in a streamed way.
8301 If a display window is opened, rendered frames are displayed in
8302 it during processing.
8303
8304 Default values: 'nb_inner_frames=10', 'first_frame=0',
8305 'last_frame=-1', 'frame_step=1' and
8306 'output_filename=(undefined)'.
8307
8308 files2video:
8309 "filename_pattern",_output_filename,_fps>0,_codec
8310
8311 Convert several files into a single video file.
8312
8313 Default values: 'output_filename=output.avi', 'fps=25' and
8314 'codec=mp4v'.
8315
8316 median_files:
8317 "filename_pattern",_first_frame>=0,_last_frame={ >=0 | -1=last
8318 },_frame_step>=1,
8319 _frame_rows[%]>=1,_is_fast_approximation={ 0 | 1 }
8320
8321 Compute the median frame of specified input image files, in a
8322 streamed way.
8323 If a display window is opened, rendered frame is displayed in
8324 it during processing.
8325
8326 Default values: 'first_frame=0', 'last_frame=-1',
8327 'frame_step=1', 'frame_rows=20%' and
8328 'is_fast_approximation=0'.
8329
8330 median_video:
8331 video_filename,_first_frame>=0,_last_frame={ >=0 | -1=last
8332 },_frame_step>=1,
8333 _frame_rows[%]>=1,_is_fast_approximation={ 0 | 1 }
8334
8335 Compute the median of all frames of an input video file, in a
8336 streamed way.
8337 If a display window is opened, rendered frame is displayed in
8338 it during processing.
8339
8340 Default values: 'first_frame=0', 'last_frame=-1',
8341 'frame_step=1', 'frame_rows=100%' and
8342 'is_fast_approximation=1'.
8343
8344 morph:
8345 nb_inner_frames>=1,_smoothness>=0,_precision>=0
8346
8347 Create morphing sequence between selected images.
8348
8349 Default values: 'smoothness=0.1' and 'precision=4'.
8350
8351 morph_files:
8352 "filename_pattern",_nb_inner_frames>0,_smoothness>=0,_preci‐
8353 sion>=0,
8354 _first_frame>=0,_last_frame={ >=0 | -1=last
8355 },_frame_step>=1,_output_filename
8356
8357 Generate a temporal morphing from specified input image files,
8358 in a streamed way.
8359 If a display window is opened, rendered frames are displayed in
8360 it during processing.
8361 The output filename may have extension '.avi' (saved as a
8362 video), or any other usual image
8363 file extension (saved as a sequence of images).
8364
8365 Default values: 'nb_inner_frames=10', 'smoothness=0.1', 'preci‐
8366 sion=4', 'first_frame=0',
8367 'last_frame=-1', 'frame_step=1' and 'output_filename=(unde‐
8368 fined)'.
8369
8370 morph_video:
8371 video_filename,_nb_inner_frames>0,_smoothness>=0,_preci‐
8372 sion>=0,_first_frame>=0,
8373 _last_frame={ >=0 | -1=last },_frame_step>=1,_output_filename
8374
8375 Generate a temporal morphing from specified input video file,
8376 in a streamed way.
8377 If a display window is opened, rendered frames are displayed in
8378 it during processing.
8379 The output filename may have extension '.avi' (saved as a
8380 video), or any other usual image
8381 file extension (saved as a sequence of images).
8382
8383 Default values: 'nb_inner_frames=10', 'smoothness=0.1', 'preci‐
8384 sion=4', 'first_frame=0',
8385 'last_frame=-1', 'frame_step=1' and 'output_filename=(unde‐
8386 fined)'.
8387
8388 register_nonrigid:
8389 [destination],_smoothness>=0,_precision>0,_nb_scale>=0
8390
8391 Register selected source images with specified destination
8392 image, using non-rigid warp.
8393
8394 Default values: 'smoothness=0.2', 'precision=6' and
8395 'nb_scale=0(auto)'.
8396
8397 register_rigid:
8398 [destination],_smoothness>=0,_boundary_conditions={ 0=dirichlet
8399 | 1=neumann |
8400 2=periodic | 3=mirror }
8401
8402 Register selected source images with specified destination
8403 image, using rigid warp (shift).
8404
8405 Default values: 'smoothness=1' and 'boundary_conditions=0'.
8406
8407 transition:
8408 [transition_shape],nb_added_frames>=0,100>=shading>=0,_sin‐
8409 gle_frame_only={
8410 -1=disabled | >=0 }
8411
8412 Generate a transition sequence between selected images.
8413
8414 Default values: 'shading=0' and 'single_frame_only=-1'.
8415
8416 transition3d:
8417 _nb_frames>=2,_nb_xtiles>0,_nb_ytiles>0,_axis_x,_axis_y,_axis_z,_is_antialias={
8418 0 | 1 }
8419
8420 Create 3D transition sequence between selected consecutive
8421 images.
8422 'axis_x', 'axis_y' and 'axis_z' can be set as mathematical
8423 expressions, depending on 'x' and 'y'.
8424
8425 Default values: 'nb_frames=10', 'nb_xtiles=nb_ytiles=3',
8426 'axis_x=1', 'axis_y=1', 'axis_z=0' and
8427 'is_antialias=1'.
8428
8429 video2files:
8430 input_filename,_output_filename,_first_frame>=0,_last_frame={
8431 >=0 | -1=last },
8432 _frame_step>=1
8433
8434 Split specified input video file into image files, one for each
8435 frame.
8436 First and last frames as well as step between frames can be
8437 specified.
8438
8439 Default values: 'output_filename=frame.png', 'first_frame=0',
8440 'last_frame=-1' and
8441 'frame_step=1'.
8442
8443 ** Convenience Functions:
8444
8445 alert:
8446 _title,_message,_label_button1,_label_button2,...
8447
8448 Display an alert box and wait for user's choice.
8449 If a single image is in the selection, it is used as an icon
8450 for the alert box.
8451
8452 Default values: 'title=[G'MIC Alert]' and 'message=This is an
8453 alert box.'.
8454
8455 arg:
8456 n>=1,_arg1,...,_argN
8457
8458 Return the n-th argument of the specified argument list.
8459
8460 arg2var:
8461 variable_name,argument_1,...,argument_N
8462
8463 For each i in [1...N], set 'variable_name$i=argument_i'.
8464 The variable name should be global to make this command useful
8465 (i.e. starts by an underscore).
8466
8467 autocrop_coords:
8468 value1,value2,... | auto
8469
8470 Return coordinates (x0,y0,z0,x1,y1,z1) of the autocrop that
8471 could be performed on the latest
8472 of the selected images.
8473
8474 Default value: 'auto'
8475
8476 base642img:
8477 "base64_string"
8478
8479 Decode given base64-encoded string as a newly inserted image at
8480 the end of the list.
8481 The argument string must have been generated using command
8482 'img2base64'.
8483
8484 base642uchar:
8485 "base64_string"
8486
8487 Decode given base64-encoded string as a newly inserted 1-column
8488 image at the end of the list.
8489 The argument string must have been generated using command
8490 'uchar2base64'.
8491
8492 basename:
8493 file_path,_variable_name_for_folder
8494
8495 Return the basename of a file path, and opt. its folder loca‐
8496 tion.
8497 When specified 'variable_name_for_folder' must starts by an
8498 underscore
8499 (global variable accessible from calling function).
8500
8501 bin:
8502 binary_int1,...
8503
8504 Print specified binary integers into their octal, decimal,
8505 hexadecimal and string
8506 representations.
8507
8508 bin2dec:
8509 binary_int1,...
8510
8511 Convert specified binary integers into their decimal represen‐
8512 tations.
8513
8514 dec:
8515 decimal_int1,...
8516
8517 Print specified decimal integers into their binary, octal,
8518 hexadecimal and string
8519 representations.
8520
8521 dec2str:
8522 decimal_int1,...
8523
8524 Convert specifial decimal integers into its string representa‐
8525 tion.
8526
8527 dec2bin:
8528 decimal_int1,...
8529
8530 Convert specified decimal integers into their binary represen‐
8531 tations.
8532
8533 dec2hex:
8534 decimal_int1,...
8535
8536 Convert specified decimal integers into their hexadecimal rep‐
8537 resentations.
8538
8539 dec2oct:
8540 decimal_int1,...
8541
8542 Convert specified decimal integers into their octal representa‐
8543 tions.
8544
8545 fact:
8546 value
8547
8548 Return the factorial of the specified value.
8549
8550 fibonacci:
8551 N>=0
8552
8553 Return the Nth number of the Fibonacci sequence.
8554
8555 file_mv:
8556 filename_src,filename_dest
8557
8558 Rename or move a file from a location $1 to another location
8559 $2.
8560
8561 file_rand:
8562
8563 Return a random filename for storing temporary data.
8564
8565 file_rm:
8566 filename
8567
8568 Delete a file.
8569
8570 filename:
8571 filename,_number1,_number2,...,_numberN
8572
8573 Return a filename numbered with specified indices.
8574
8575 files (+):
8576 _mode,path
8577
8578 Return the list of files and/or subfolders from specified path.
8579 'path' can be eventually a matching pattern.
8580 'mode' can be { 0=files only | 1=folders only | 2=files + fold‐
8581 ers }.
8582 Add '3' to 'mode' to return full paths instead of filenames
8583 only.
8584
8585 Default value: 'mode=5'.
8586
8587 fitratio_wh:
8588 min_width,min_height,ratio_wh
8589
8590 Return a 2D size 'width,height' which is bigger than
8591 'min_width,min_height' and has the
8592 specified w/h ratio.
8593
8594 fitscreen:
8595 width,height,_depth,_minimal_size[%],_maximal_size[%] |
8596 [image],_minimal_size[%],_maximal_size[%]
8597
8598 Return the 'ideal' size WxH for a window intended to display an
8599 image of specified size on screen.
8600
8601 Default values: 'depth=1', 'minimal_size=128' and 'maxi‐
8602 mal_size=85%'.
8603
8604 fontchart:
8605
8606 Insert G'MIC font chart at the end of the image list.
8607
8608 fps:
8609
8610 Return the number of time this function is called per second,
8611 or -1 if this info is not yet
8612 available.
8613 Useful to display the framerate when displaying animations.
8614
8615 gcd:
8616 a,b
8617
8618 Return the GCD (greatest common divisor) between a and b.
8619
8620 hex:
8621 hexadecimal_int1,...
8622
8623 Print specified hexadecimal integers into their binary, octal,
8624 decimal and string
8625 representations.
8626
8627 hex2dec:
8628 hexadecimal_int1,...
8629
8630 Convert specified hexadecimal integers into their decimal rep‐
8631 resentations.
8632
8633 hex2img:
8634 "hexadecimal_string"
8635
8636 Insert new image 1xN at the end of the list with values speci‐
8637 fied by the given
8638 hexadecimal-encoded string.
8639
8640 hex2str:
8641 hexadecimal_string
8642
8643 Convert specified hexadecimal string into a string.
8644
8645 img2hex:
8646
8647 Return representation of last image as an hexadecimal-encoded
8648 string.
8649 Input image must have values that are integers in [0,255].
8650
8651 img2str:
8652
8653 Return the content of the latest of the selected images as a
8654 special G'MIC input string.
8655
8656 img2text:
8657 _line_separator
8658
8659 Return text contained in a multi-line image.
8660
8661 Default value: 'line_separator= '.
8662
8663 img82hex:
8664
8665 Convert selected 8bits-valued vectors into their hexadecimal
8666 representations (ascii-encoded).
8667
8668 hex2img8:
8669
8670 Convert selected hexadecimal representations (ascii-encoded)
8671 into 8bits-valued vectors.
8672
8673 is_3d:
8674
8675 Return 1 if all of the selected images are 3D objects, 0 other‐
8676 wise.
8677
8678 is_change:
8679 _value={ 0=false | 1=true }
8680
8681 Set or unset the 'is_change' flag associated to the image list.
8682 This flag tells the interpreter whether or not the image list
8683 should be displayed when the
8684 pipeline ends.
8685
8686 Default value: 'value=1'.
8687
8688 is_ext:
8689 filename,_extension
8690
8691 Return 1 if specified filename has a given extensioin.
8692
8693 is_image_arg:
8694 string
8695
8696 Return 1 if specified string looks like '[ind]'.
8697
8698 is_pattern:
8699 string
8700
8701 Return 1 if specified string looks like a drawing pattern
8702 '0x......'.
8703
8704 is_percent:
8705 string
8706
8707 Return 1 if specified string ends with a '%', 0 otherwise.
8708
8709 is_videofilename:
8710
8711 Return 1 if extension of specified filename is typical from
8712 video files.
8713
8714 is_windows:
8715
8716 Return 1 if current computer OS is Windows, 0 otherwise.
8717
8718 math_lib:
8719
8720 Return string that defines a set of several useful macros for
8721 the embedded math evaluator.
8722
8723 mad:
8724
8725 Return the MAD (Maximum Absolute Deviation) of the last
8726 selected image.
8727 The MAD is defined as MAD = med_i|x_i-med_j(x_j)|
8728
8729 max_w:
8730
8731 Return the maximal width between selected images.
8732
8733 max_h:
8734
8735 Return the maximal height between selected images.
8736
8737 max_d:
8738
8739 Return the maximal depth between selected images.
8740
8741 max_s:
8742
8743 Return the maximal spectrum between selected images.
8744
8745 max_wh:
8746
8747 Return the maximal wxh size of selected images.
8748
8749 max_whd:
8750
8751 Return the maximal wxhxd size of selected images.
8752
8753 max_whds:
8754
8755 Return the maximal wxhxdxs size of selected images.
8756
8757 med:
8758
8759 Return the median value of the last selected image.
8760
8761 median_color:
8762
8763 Return the median color value of the last selected image.
8764
8765 min_w:
8766
8767 Return the minimal width between selected images.
8768
8769 min_h:
8770
8771 Return the minimal height between selected images.
8772
8773 min_d:
8774
8775 Return the minimal depth between selected images.
8776
8777 min_s:
8778
8779 Return the minimal s size of selected images.
8780
8781 min_wh:
8782
8783 Return the minimal wxh size of selected images.
8784
8785 min_whd:
8786
8787 Return the minimal wxhxd size of selected images.
8788
8789 min_whds:
8790
8791 Return the minimal wxhxdxs size of selected images.
8792
8793 named (+):
8794 _mode,"name1","name2",...
8795
8796 Return the set of indices corresponding to images of the selec‐
8797 tion with specified names.
8798 After this command returns, the status contains a list of
8799 indices (unsigned integers),
8800 separated by commas (or an empty string if no images with those
8801 names have been found).
8802 (eq. to 'nmd').
8803 'mode' can be { 0=all indices (default) | 1=lowest index |
8804 2=highest index | 3 = all indices
8805 (case insensitive) | 4 = lowest index (case insensitive) | 5
8806 = highest index (case insensitive)}
8807
8808 normalize_filename:
8809 filename
8810
8811 Return a "normalized" version of the specified filename, with‐
8812 out spaces and capital letters.
8813
8814 oct:
8815 octal_int1,...
8816
8817 Print specified octal integers into their binary, decimal,
8818 hexadecimal and string
8819 representations.
8820
8821 oct2dec:
8822 octal_int1,...
8823
8824 Convert specified octal integers into their decimal representa‐
8825 tions.
8826
8827 padint:
8828 number,_size>0
8829
8830 Return a integer with 'size' digits (eventually left-padded
8831 with '0').
8832
8833 path_cache:
8834
8835 Return a path to store G'MIC data files for one user (whose
8836 value is OS-dependent).
8837
8838 path_gimp:
8839
8840 Return a path to store GIMP configuration files for one user
8841 (whose value is OS-dependent).
8842
8843 path_tmp:
8844
8845 Return a path to store temporary files (whose value is OS-
8846 dependent).
8847
8848 reset:
8849
8850 Reset global parameters of the interpreter environment.
8851
8852 RGB:
8853
8854 Return a random int-valued RGB color.
8855
8856 RGBA:
8857
8858 Return a random int-valued RGBA color.
8859
8860 std_noise:
8861
8862 Return the estimated noise standard deviation of the last
8863 selected image.
8864
8865 str:
8866 string
8867
8868 Print specified string into its binary, octal, decimal and
8869 hexadecimal representations.
8870
8871 str2hex:
8872 string
8873
8874 Convert specified string into a sequence of hexadecimal values.
8875
8876 strcontains:
8877 string1,string2
8878
8879 Return 1 if the first string contains the second one.
8880
8881 strlen:
8882 string1
8883
8884 Return the length of specified string argument.
8885
8886 strreplace:
8887 string,search,replace
8888
8889 Search and replace substrings in an input string.
8890
8891 strlowercase:
8892 string
8893
8894 Return a lower-case version of the specified string.
8895
8896 strvar:
8897 string
8898
8899 Return a simplified version of the specified string, that can
8900 be used as a variable name.
8901
8902 strver:
8903 _version
8904
8905 Return the specified version number of the G'MIC interpreter,
8906 as a string.
8907
8908 Default value: 'version=$_version'.
8909
8910 tic:
8911
8912 Initialize tic-toc timer.
8913 Use it in conjunction with 'toc'.
8914
8915 toc:
8916
8917 Display elapsed time of the tic-toc timer since the last call
8918 to 'tic'.
8919 This command returns the elapsed time in the status value.
8920 Use it in conjunction with 'tic'.
8921
8922 to_clutname:
8923 "string"
8924
8925 Return simplified name that can be used as a CLUT name, from
8926 specified input string.
8927
8928 uchar2base64:
8929 _encoding={ 0=base64 | 1=base64url }
8930
8931 Encode the values of the latest of the selected images as a
8932 base64-encoded string.
8933 The string can be decoded using command 'base642uchar'.
8934 Selected images must have values that are integers in [0,255].
8935
8936 Default values: 'encoding=0'.
8937
8938 img2base64:
8939 _encoding={ 0=base64 | 1=base64url }
8940
8941 Encode selected images as a base64-encoded string.
8942 The images can be then decoded using command 'base642img'.
8943
8944 Default values: 'encoding=0'.
8945
8946 average_colors:
8947
8948 Return the average vector-value of the latest of the selected
8949 images.
8950
8951 covariance_colors:
8952 _avg_outvarname
8953
8954 Return the covariance matrix of the vector-valued colors in the
8955 latest of the selected images
8956 (for arbitrary number of channels).
8957 Parameter 'avg_outvarname' is used as a variable name that
8958 takes the value of the average
8959 vector-value.
8960
8961 ** Other Interactive Commands:
8962
8963 demo:
8964 _run_in_parallel={ 0=no | 1=yes | 2=auto }
8965
8966 Show a menu to select and view all G'MIC interactive demos.
8967
8968 x_2048:
8969
8970 Launch the 2048 game.
8971
8972 x_blobs:
8973
8974 Launch the blobs editor.
8975
8976 x_bouncing:
8977
8978 Launch the bouncing balls demo.
8979
8980 x_color_curves:
8981 _colorspace={ rgb | cmy | cmyk | hsi | hsl | hsv | lab | lch |
8982 ycbcr | last }
8983
8984 Apply color curves on selected RGB[A] images, using an interac‐
8985 tive window.
8986 Set 'colorspace' to 'last' to apply last defined color curves
8987 without opening interactive windows.
8988
8989 Default value: 'colorspace=rgb'.
8990
8991 x_colorize:
8992 _is_lineart={ 0 | 1 },_max_resolution={ 0 | >=128 },_multichan‐
8993 nels_output={ 0 |
8994 1 },_[palette1],_[palette2],_[grabber1]
8995
8996 Colorized selected B&W images, using an interactive window.
8997 When >0, argument 'max_resolution' defines the maximal image
8998 resolution used in the interactive window.
8999
9000 Default values: 'is_lineart=1', 'max_resolution=1024' and 'mul‐
9001 tichannels_output=0'.
9002
9003 x_connect4:
9004
9005 Launch the Connect Four game.
9006
9007 x_crop:
9008
9009 Crop selected images interactively.
9010 (eq. to 'xz').
9011
9012 x_cut:
9013
9014 Cut selected images interactively.
9015
9016 x_fire:
9017
9018 Launch the fire effect demo.
9019
9020 x_fireworks:
9021
9022 Launch the fireworks demo.
9023
9024 x_fisheye:
9025
9026 Launch the fish-eye effect demo.
9027
9028 x_fourier:
9029
9030 Launch the fourier filtering demo.
9031
9032 x_grab_color:
9033 _variable_name
9034
9035 Open a color grabber widget from the first selected image.
9036 Argument 'variable_name' specifies the variable that contains
9037 the selected color values at any time.
9038 Assigning '-1' to it forces the interactive window to close.
9039
9040 Default values: 'variable_name=xgc_variable'.
9041
9042 x_hanoi:
9043
9044 Launch the Tower of Hanoi game.
9045
9046 x_histogram:
9047
9048 Launch the histogram demo.
9049
9050 x_hough:
9051
9052 Launch the hough transform demo.
9053
9054 x_jawbreaker:
9055 0<_width<20,0<_height<20,0<_balls<=8
9056
9057 Launch the Jawbreaker game.
9058
9059 x_landscape:
9060
9061 Launch the virtual landscape demo.
9062
9063 x_life:
9064
9065 Launch the game of life.
9066
9067 x_light:
9068
9069 Launch the light effect demo.
9070
9071 x_mandelbrot:
9072 _julia={ 0 | 1 },_c0r,_c0i
9073
9074 Launch Mandelbrot/Julia explorer.
9075
9076 x_mask_color:
9077 _colorspace={ all | rgb | lrgb | ycbcr | lab | lch | hsv | hsi
9078 | hsl | cmy |
9079 cmyk | yiq },_spatial_tolerance>=0,_color_tolerance>=0
9080
9081 Interactively select a color, and add an alpha channel contain‐
9082 ing the corresponding color mask.
9083 Argument 'colorspace' refers to the color metric used to com‐
9084 pute color similarities, and can be basically
9085 one of { rgb | lrgb | ycbcr | lab | lch | hsv | hsi | hsl | cmy
9086 | cmyk | yiq }.
9087 You can also select one one particular channel of this col‐
9088 orspace, by setting 'colorspace' as
9089 'colorspace_channel' (e.g. 'hsv_h' for the hue).
9090
9091 Default values: 'colorspace=all', 'spatial_tolerance=5' and
9092 'color_tolerance=5'.
9093
9094 x_metaballs3d:
9095
9096 Launch the 3D metaballs demo.
9097
9098 x_minesweeper:
9099 8<=_width=<20,8<=_height<=20
9100
9101 Launch the Minesweeper game.
9102
9103 x_minimal_path:
9104
9105 Launch the minimal path demo.
9106
9107 x_morph:
9108 _nb_frames>=2,_preview_fidelity={ 0=coarsest | 1=coarse |
9109 2=normal | 3=fine |
9110 4=finest }
9111
9112 Launch the interactive image morpher.
9113
9114 Default values: 'nb_frames=16' and 'preview_fidelity=3'.
9115
9116 x_pacman:
9117
9118 Launch pacman game.
9119
9120 x_paint:
9121
9122 Launch the interactive painter.
9123
9124 x_plasma:
9125
9126 Launch the plasma effect demo.
9127
9128 x_quantize_rgb:
9129 _nbcolors>=2
9130
9131 Launch the RGB color quantization demo.
9132
9133 x_reflection3d:
9134
9135 Launch the 3D reflection demo.
9136
9137 x_rubber3d:
9138
9139 Launch the 3D rubber object demo.
9140
9141 x_segment:
9142 _max_resolution={ 0 | >=128 }
9143
9144 Segment foreground from background in selected opaque RGB
9145 images, interactively.
9146 Return RGBA images with binary alpha-channels.
9147
9148 Default value: 'max_resolution=1024'.
9149
9150 x_select_color:
9151 _variable_name
9152
9153 Display a RGB or RGBA color selector.
9154 Argument 'variable_name' specifies the variable that contains
9155 the selected color values (as R,G,B,[A])
9156 at any time.
9157 Its value specifies the initial selected color. Assigning '-1'
9158 to it forces the interactive
9159 window to close.
9160
9161 Default value: 'variable_name=xsc_variable'.
9162
9163 x_select_function1d:
9164 _variable_name,_background_curve_R,_background_curve_G,_back‐
9165 ground_curve_B
9166
9167 Open an interactive window, where the user can defined its own
9168 1D function.
9169 If an image is selected, it is used to display additional
9170 information :
9171 - The first row defines the values of a background curve dis‐
9172 played on the window (e.g. an
9173 histogram).
9174 - The 2nd, 3rd and 4th rows define the R,G,B color components
9175 displayed beside the X and Y axes.
9176 Argument 'variable_name' specifies the variable that contains
9177 the selected function keypoints
9178 at any time.
9179 Assigning '-1' to it forces the interactive window to close.
9180
9181 Default values: 'variable_name=xsf_variable', 'back‐
9182 ground_curve_R=220',
9183 'background_curve_G=background_curve_B=background_curve_T'.
9184
9185 x_select_palette:
9186 _variable_name,_number_of_columns={ 0=auto | >0 }
9187
9188 Open a RGB or RGBA color selector widget from a palette.
9189 The palette is given as a selected image.
9190 Argument 'variable_name' specifies the variable that contains
9191 the selected color values (as R,G,B,[A])
9192 at any time.
9193 Assigning '-1' to it forces the interactive window to close.
9194
9195 Default values: 'variable_name=xsp_variable' and 'num‐
9196 ber_of_columns=2'.
9197
9198 x_shadebobs:
9199
9200 Launch the shade bobs demo.
9201
9202 x_spline:
9203
9204 Launch spline curve editor.
9205
9206 x_starfield3d:
9207
9208 Launch the 3D starfield demo.
9209
9210 x_tetris:
9211
9212 Launch tetris game.
9213
9214 x_threshold:
9215
9216 Threshold selected images interactively.
9217
9218 x_tictactoe:
9219
9220 Launch tic-tac-toe game.
9221
9222 x_warp:
9223 _nb_keypoints_xgrid>=2,_nb_keypoints_ygrid>=2,_nb_key‐
9224 points_contours>=0,
9225 _preview_fidelity={ 0=coarsest | 1=coarse | 2=normal | 3=fine
9226 | 4=finest }
9227
9228 Launch the interactive image warper.
9229
9230 Default values: 'nb_keypoints_xgrid=nb_keypoints_ygrid=2',
9231 'nb_keypoints_contours=0' and
9232 'preview_fidelity=1'.
9233
9234 x_waves:
9235
9236 Launch the image waves demo.
9237
9238 x_whirl:
9239 _opacity>=0
9240
9241 Launch the fractal whirls demo.
9242
9243 Default values: 'opacity=0.2'.
9244
9245
9246 **** Command shortcuts:
9247
9248
9249 != (+): eq. to 'neq'.
9250 % (+): eq. to 'mod'.
9251 & (+): eq. to 'and'.
9252 * (+): eq. to 'mul'.
9253 *3d (+): eq. to 'mul3d'.
9254 + (+): eq. to 'add'.
9255 +3d (+): eq. to 'add3d'.
9256 - (+): eq. to 'sub'.
9257 -3d (+): eq. to 'sub3d'.
9258 / (+): eq. to 'div'.
9259 /3d (+): eq. to 'div3d'.
9260 < (+): eq. to 'lt'.
9261 << (+): eq. to 'bsl'.
9262 <= (+): eq. to 'le'.
9263 = (+): eq. to 'set'.
9264 == (+): eq. to 'eq'.
9265 > (+): eq. to 'gt'.
9266 >= (+): eq. to 'ge'.
9267 >> (+): eq. to 'bsr'.
9268 ^ (+): eq. to 'pow'.
9269 a (+): eq. to 'append'.
9270 ac : eq. to 'apply_channels'.
9271 ap : eq. to 'apply_parallel'.
9272 apc : eq. to 'apply_parallel_channels'.
9273 apo : eq. to 'apply_parallel_overlap'.
9274 at : eq. to 'apply_tiles'.
9275 b (+): eq. to 'blur'.
9276 c (+): eq. to 'cut'.
9277 c3d : eq. to 'center3d'.
9278 col3d (+): eq. to 'color3d'.
9279 d (+): eq. to 'display'.
9280 d0 : eq. to 'display0'.
9281 d2d : eq. to 'display2d'.
9282 d3d (+): eq. to 'display3d'.
9283 da : eq. to 'display_array'.
9284 db3d (+): eq. to 'double3d'.
9285 dfft : eq. to 'display_fft'.
9286 dg : eq. to 'display_graph'.
9287 dh : eq. to 'display_histogram'.
9288 dp : eq. to 'display_parallel'.
9289 dp0 : eq. to 'display_parallel0'.
9290 dq : eq. to 'display_quiver'.
9291 drgba : eq. to 'display_rgba'.
9292 dt : eq. to 'display_tensors'.
9293 dw : eq. to 'display_warp'.
9294 e (+): eq. to 'echo'.
9295 endl (+): eq. to 'endlocal'.
9296 f (+): eq. to 'fill'.
9297 f3d (+): eq. to 'focale3d'.
9298 fc : eq. to 'fill_color'.
9299 fi (+): eq. to 'endif'.
9300 frame : eq. to 'frame_xy'.
9301 g (+): eq. to 'gradient'.
9302 h : eq. to 'help'.
9303 i (+): eq. to 'input'.
9304 ig : eq. to 'input_glob'.
9305 ir : eq. to 'inrange'.
9306 j (+): eq. to 'image'.
9307 j3d (+): eq. to 'object3d'.
9308 k (+): eq. to 'keep'.
9309 l (+): eq. to 'local'.
9310 l3d (+): eq. to 'light3d'.
9311 m (+): eq. to 'command'.
9312 m* (+): eq. to 'mmul'.
9313 m/ (+): eq. to 'mdiv'.
9314 m3d (+): eq. to 'mode3d'.
9315 md3d (+): eq. to 'moded3d'.
9316 mv (+): eq. to 'move'.
9317 n (+): eq. to 'normalize'.
9318 n3d : eq. to 'normalize3d'.
9319 nm (+): eq. to 'name'.
9320 nmd (+): eq. to 'named'.
9321 o (+): eq. to 'output'.
9322 o3d (+): eq. to 'opacity3d'.
9323 on : eq. to 'outputn'.
9324 op : eq. to 'outputp'.
9325 ow : eq. to 'outputw'.
9326 ox : eq. to 'outputx'.
9327 p (+): eq. to 'print'.
9328 p3d : eq. to 'primitives3d'.
9329 q (+): eq. to 'quit'.
9330 r (+): eq. to 'resize'.
9331 r2dx : eq. to 'resize2dx'.
9332 r2dy : eq. to 'resize2dy'.
9333 r3d (+): eq. to 'rotate3d'.
9334 r3dx : eq. to 'resize3dx'.
9335 r3dy : eq. to 'resize3dy'.
9336 r3dz : eq. to 'resize3dz'.
9337 rm (+): eq. to 'remove'.
9338 rr2d : eq. to 'resize_ratio2d'.
9339 rv (+): eq. to 'reverse'.
9340 rv3d (+): eq. to 'reverse3d'.
9341 s (+): eq. to 'split'.
9342 s3d (+): eq. to 'split3d'.
9343 sh (+): eq. to 'shared'.
9344 sl3d (+): eq. to 'specl3d'.
9345 sp : eq. to 'sample'.
9346 ss3d (+): eq. to 'specs3d'.
9347 t (+): eq. to 'text'.
9348 t3d : eq. to 'texturize3d'.
9349 to : eq. to 'text_outline'.
9350 u (+): eq. to 'status'.
9351 up : eq. to 'update'.
9352 v (+): eq. to 'verbose'.
9353 w (+): eq. to 'window'.
9354 x (+): eq. to 'exec'.
9355 xz : eq. to 'x_crop'.
9356 y (+): eq. to 'unroll'.
9357 z (+): eq. to 'crop'.
9358 | (+): eq. to 'or'.
9359
9360 [ Total number of commands: 998 ]
9361
9362 13. Examples of use
9363
9364 'gmic' is a generic image processing tool which can be used in a wide
9365 variety of situations.
9366 The few examples below illustrate possible uses of this tool:
9367
9368 - View a list of images:
9369 gmic file1.bmp file2.jpeg
9370
9371 - Convert an image file:
9372 gmic input.bmp output output.jpg
9373
9374 - Create a volumetric image from a movie sequence:
9375 gmic input.mpg append z output output.hdr
9376
9377 - Compute image gradient norm:
9378 gmic input.bmp gradient_norm
9379
9380 - Denoise a color image:
9381 gmic image.jpg denoise 30,10 output denoised.jpg
9382
9383 - Compose two images using overlay layer blending:
9384 gmic image1.jpg image2.jpg blend overlay output blended.jpg
9385
9386 - Evaluate a mathematical expression:
9387 gmic echo "cos(pi/4)^2+sin(pi/4)^2={cos(pi/4)^2+sin(pi/4)^2}"
9388
9389 - Plot a 2D function:
9390 gmic 1000,1,1,2 fill
9391 "X=3*(x-500)/500;X^2*sin(3*X^2)+if(c==0,u(0,-1),cos(X*10))" plot
9392
9393 - Plot a 3D elevated function in random colors:
9394 gmic 128,128,1,3,"u(0,255)" plasma 10,3 blur 4 sharpen 10000 \
9395 elevation3d[-1]
9396 "'X=(x-64)/6;Y=(y-64)/6;100*exp(-(X^2+Y^2)/30)*abs(cos(X)*sin(Y))'"
9397
9398 - Plot the isosurface of a 3D volume:
9399 gmic mode3d 5 moded3d 5 double3d 0 isosurface3d
9400 "'x^2+y^2+abs(z)^abs(4*cos(x*y*z*3))'",3
9401
9402 - Render a G'MIC 3D logo:
9403 gmic 0 text G\'MIC,0,0,53,1,1,1,1 expand_xy 10,0 blur 1 normalize
9404 0,100 +plasma 0.4 add \
9405 blur 1 elevation3d -0.1 moded3d 4
9406
9407 - Generate a 3D ring of torii:
9408 gmic repeat 20 torus3d 15,2 color3d[-1]
9409 "{u(60,255)},{u(60,255)},{u(60,255)}" \
9410 *3d[-1] 0.5,1 if "{$>%2}" rotate3d[-1] 0,1,0,90 fi add3d[-1] 70
9411 add3d \
9412 rotate3d 0,0,1,18 done moded3d 3 mode3d 5 double3d 0
9413
9414 - Create a vase from a 3D isosurface:
9415 gmic moded3d 4 isosurface3d "'x^2+2*abs(y/2)*sin(2*y)^2+z^2-3',0"
9416 sphere3d 1.5 \
9417 sub3d[-1] 0,5 plane3d 15,15 rotate3d[-1] 1,0,0,90 center3d[-1]
9418 add3d[-1] 0,3.2 \
9419 color3d[-1] 180,150,255 color3d[-2] 128,255,0 color3d[-3]
9420 255,128,0 add3d
9421
9422 - Display filtered webcam stream:
9423 gmic apply_camera \"+mirror x +mirror y add div 4\"
9424
9425 - Launch a set of G'MIC interactive demos:
9426 gmic demo
9427
9428 ** G'MIC comes with ABSOLUTELY NO WARRANTY; for details visit:
9429 https://gmic.eu **
9430
9431
9432
9433 G'MIC(1)