G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 3.1.6        Current pre-release: 3.2.0

Reference

Table of Contents  ▸  List of Commands◀  Adding Custom Commands    |    Funny Oneliners  ▶

List of Commands

All available G'MIC commands are listed below, by categories. An argument specified between [] or starting by _ is optional except when standing for an existing image [image], where image can be either an index number or an image name. In this case, the [] characters are mandatory when writing the item. Note that all images that serve as illustrations in this reference documentation are normalized in range [0,255] before being displayed. You may need to do this explicitly (command normalize 0,255) if you want to save and view images with the same aspect than those illustrated in the example codes.

Categories:

Global Options:

debug help version

Input / Output:

camera clut command cursor delete
display display0 display2d display3d display_array
display_camera display_fft display_graph display_histogram display_parametric
display_parallel display_parallel0 display_polar display_quiver display_rgba
display_tensors display_warp echo echo_file function1d
identity input input_565 input_csv input_cube
input_flo input_glob input_gpl input_cached input_obj
input_text lorem network output output_565
output_cube output_flo output_ggr output_gmz output_obj
output_text outputn outputp outputw outputx
parse_cli parse_gmd gmd2html gmd2ascii parse_gui
pass plot portrait print random_pattern
screen select serialize shape_circle shape_cupid
shape_diamond shape_dragon shape_fern shape_gear shape_heart
shape_polygon shape_snowflake shape_star shared sample
srand store testimage2d uncommand uniform_distribution
unserialize update verbose wait warn
window

List Manipulation:

keep keep_named move name remove
remove_duplicates remove_empty remove_named reverse sort_list

Mathematical Operators:

abs acos acosh add and
argmax argmaxabs argmin argminabs asin
asinh atan atan2 atanh bsl
bsr cos cosh deg2rad div
div_complex eq erf exp ge
gt le lt log log10
log2 max maxabs mdiv med
min minabs mod mmul mul
mul_channels mul_complex neq or pow
rad2deg rol ror sign sin
sinc sinh sqr sqrt sub
tan tanh xor

Values Manipulation:

apply_curve apply_gamma balance_gamma cast complex2polar
compress_clut compress_rle cumulate cut decompress_clut
decompress_clut_rbf decompress_clut_pde decompress_rle discard eigen2tensor
endian equalize fill index inrange
map mix_channels negate noise noise_perlin
noise_poissondisk normp norm normalize normalize_l2
normalize_sum not orientation oneminus otsu
polar2complex quantize quantize_area rand replace
replace_inf replace_nan replace_naninf replace_seq replace_str
round roundify set threshold vector2tensor

Colors:

adjust_colors apply_channels autoindex bayer2rgb deltaE
cmy2rgb cmyk2rgb colorblind colormap compose_channels
direction2rgb ditheredbw fill_color gradient2rgb hcy2rgb
hsi2rgb hsi82rgb hsl2rgb hsl82rgb hsv2rgb
hsv82rgb int2rgb ipremula jzazbz2rgb jzazbz2xyz
lab2lch lab2rgb lab2srgb lab82srgb lab2xyz
lab82rgb lch2lab lch2rgb lch82rgb luminance
lightness lut_contrast map_clut mix_rgb oklab2rgb
palette premula pseudogray replace_color retinex
rgb2bayer rgb2cmy rgb2cmyk rgb2hcy rgb2hsi
rgb2hsi8 rgb2hsl rgb2hsl8 rgb2hsv rgb2hsv8
rgb2int rgb2jzazbz rgb2lab rgb2lab8 rgb2lch
rgb2lch8 rgb2luv rgb2oklab rgb2ryb rgb2srgb
rgb2xyz rgb2xyz8 rgb2yiq rgb2yiq8 rgb2ycbcr
rgb2yuv rgb2yuv8 remove_opacity ryb2rgb select_color
sepia solarize split_colors split_opacity srgb2lab
srgb2lab8 srgb2rgb to_a to_color to_colormode
to_gray to_graya to_pseudogray to_rgb to_rgba
transfer_histogram transfer_pca transfer_rgb xyz2jzazbz xyz2lab
xyz2rgb xyz82rgb ycbcr2rgb yiq2rgb yiq82rgb
yuv2rgb yuv82rgb

Geometry Manipulation:

append append_tiles apply_scales autocrop autocrop_components
autocrop_seq channels columns crop diagonal
edgels elevate expand_x expand_xy expand_xyz
expand_y expand_z extract extract_region montage
mirror permute resize resize_as_image resize_mn
resize_pow2 resize_ratio2d resize2din resize3din resize2dout
resize3dout resize2dx resize2dy resize3dx resize3dy
resize3dz rotate rotate_tileable rows scale2x
scale3x scale_dcci2x seamcarve shift shrink_x
shrink_xy shrink_xyz shrink_y shrink_z slices
sort split split_tiles undistort unroll
upscale_smart warp warp_patch warp_rbf

Filtering:

bandpass bilateral blur blur_angular blur_bloom
blur_linear blur_radial blur_selective blur_x blur_xy
blur_xyz blur_y blur_z boxfilter bump2normal
closing closing_circ compose_freq convolve convolve_fft
correlate cross_correlation curvature dct deblur
deblur_goldmeinel deblur_richardsonlucy deconvolve_fft deinterlace denoise
denoise_haar denoise_cnn denoise_patchpca deriche dilate
dilate_circ dilate_oct dilate_threshold divergence dog
diffusiontensors edges erode erode_circ erode_oct
erode_threshold fft gradient gradient_norm gradient_orientation
guided haar heat_flow hessian idct
iee ifft ihaar ilaplacian inn
inpaint inpaint_pde inpaint_flow inpaint_holes inpaint_morpho
inpaint_matchpatch kuwahara laplacian lic map_tones
map_tones_fast meancurvature_flow median nlmeans nlmeans_core
normalize_local normalized_cross_correlation opening opening_circ percentile
peronamalik_flow phase_correlation pde_flow periodize_poisson rbf
red_eye remove_hotpixels remove_pixels rolling_guidance sharpen
smooth split_freq solve_poisson split_details structuretensors
solidify syntexturize syntexturize_matchpatch tv_flow unsharp
unsharp_octave vanvliet voronoi watermark_fourier watershed

Features Extraction:

area area_fg at_line at_quadrangle barycenter
delaunay detect_skin displacement distance fftpolar
histogram histogram_nd histogram_cumul histogram_pointwise hough
ifftpolar img2patches isophotes label label_fg
laar max_patch min_patch minimal_path mse
mse_matrix patches2img patches matchpatch plot2value
pointcloud psnr psnr_matrix segment_watershed shape2bump
skeleton slic ssd_patch ssim ssim_matrix
thinning tones topographic_map tsp variance_patch

Image Drawing:

arrow axes ball chessboard cie1931
circle close_binary ellipse flood gaussian
graph grid image line thickline
mandelbrot marble maze maze_mask newton_fractal
object3d pack_sprites piechart plasma point
polka_dots polygon quiver rectangle rorschach
sierpinski spiralbw spline tetraedron_shade text
text_outline triangle_shade truchet turbulence yinyang

Matrix Computation:

dijkstra eigen eye invert orthogonalize
meigen mproj solve svd transpose
trisolve

3D Meshes:

add3d animate3d apply_camera3d apply_matrix3d array3d
arrow3d axes3d boundingbox3d box3d center3d
circle3d circles3d color3d colorcube3d cone3d
cubes3d cup3d cylinder3d delaunay3d distribution3d
div3d double3d elevation3d empty3d extrude3d
focale3d gaussians3d gmic3d gyroid3d histogram3d
image6cube3d imageblocks3d imagecube3d imageplane3d imagepyramid3d
imagerubik3d imagesphere3d isoline3d isosurface3d label3d
label_points3d lathe3d light3d line3d lissajous3d
mode3d moded3d mul3d normalize3d opacity3d
parametric3d pca_patch3d plane3d point3d pointcloud3d
pose3d primitives3d projections3d pyramid3d quadrangle3d
random3d reverse3d rotate3d rotation3d sierpinski3d
size3d skeleton3d snapshot3d specl3d specs3d
sphere3d spherical3d spline3d split3d sprite3d
sprites3d star3d streamline3d sub3d superformula3d
surfels3d tensors3d text_pointcloud3d text3d texturize3d
torus3d triangle3d volume3d weird3d

Flow Control:

apply_parallel apply_parallel_channels apply_parallel_overlap apply_tiles apply_timeout
check check3d continue break do
done elif else fi error
eval exec exec_out for foreach
if local mutex noarg onfail
parallel progress quit repeat return
rprogress run skip status while

Neural Networks:

nn_lib nn_init nn_check_layer nn_layer_add nn_layer_append
nn_layer_avgpool2d nn_layer_batchnorm nn_layer_clone nn_layer_conv2d nn_layer_conv2dbnnl
nn_layer_conv2dnl nn_layer_input nn_layer_resconv2d nn_layer_resconv2dnl nn_layer_crop
nn_layer_fc nn_layer_resfc nn_layer_resfcnl nn_layer_dict nn_layer_fcbnnl
nn_layer_fcnl nn_layer_maxpool2d nn_layer_nl nn_layer_rename nn_layer_reshape
nn_layer_resize nn_layer_run nn_layer_split nn_loss_crossentropy nn_loss_mse
nn_loss_softmax_crossentropy nn_trainer nn_size nn_load nn_save

Arrays, Tiles and Frames:

array array_fade array_mirror array_random frame_blur
frame_cube frame_fuzzy frame_painting frame_pattern frame_round
frame_seamless frame_x frame_xy frame_xyz frame_y
img2ascii imagegrid imagegrid_hexagonal imagegrid_triangular linearize_tiles
map_sprites pack puzzle quadratize_tiles rotate_tiles
shift_tiles taquin tunnel

Artistic:

boxfitting brushify cartoon color_ellipses cubism
draw_whirl drawing drop_shadow ellipsionism fire_edges
fractalize glow halftone hardsketchbw hearts
houghsketchbw lightrays light_relief linify mosaic
old_photo pencilbw pixelsort polaroid polygonize
poster_edges poster_hope rodilius sketchbw sponge
stained_glass stars stencil stencilbw stylize
tetris warhol weave whirls

Warpings:

deform euclidean2polar equirectangular2nadirzenith fisheye flower
kaleidoscope map_sphere nadirzenith2equirectangular polar2euclidean raindrops
ripple rotoidoscope spherize symmetrize transform_polar
twirl warp_perspective water wave wind
zoom

Degradations:

cracks light_patch noise_hurl pixelize scanlines
shade_stripes shadow_patch spread stripes_y texturize_canvas
texturize_paper vignette watermark_visible

Blending and Fading:

blend blend blend_edges blend_fade blend_median
blend_seamless fade_diamond fade_linear fade_radial fade_x
fade_y fade_z sub_alpha

Image Sequences and Videos:

animate apply_camera apply_files apply_video average_files
average_video fade_files fade_video files2video median_files
median_video morph morph_files morph_rbf morph_video
register_nonrigid register_rigid transition transition3d video2files

Convenience Functions:

alert arg arg0 arg2img arg2var
autocrop_coords average_vectors base642img base642uint8 basename
bin bin2dec covariance_vectors dec dec2str
dec2bin dec2hex dec2oct fact fibonacci
file_mv file_rand filename files files2img
fitratio_wh fitscreen fontchart fps gcd
hex hex2dec hex2img hex2str img2base64
img2hex img2str img2text img82hex hex2img8
is_3d is_change is_half is_ext is_image_arg
is_pattern is_percent is_videofilename is_macos is_windows
math_lib mad max_w max_h max_d
max_s max_wh max_whd max_whds median_vectors
min_w min_h min_d min_s min_wh
min_whd min_whds named narg normalize_filename
oct oct2dec padint path_cache path_current
path_gimp path_tmp remove_copymark reset rgb
rgba shell_cols size_value std_noise str
str2hex strcapitalize strcontains strlen strreplace
strlowercase struppercase strvar strcasevar strver
tic toc to_clutname uint82base64

Other Interactive Commands:

demos tixy x_2048 x_blobs x_bouncing
x_color_curves x_colorize x_connect4 x_crop x_cut
x_fire x_fireworks x_fisheye x_fourier x_grab_color
x_hanoi x_histogram x_hough x_jawbreaker x_landscape
x_life x_light x_mandelbrot x_mask_color x_metaballs3d
x_minesweeper x_minimal_path x_morph x_pacman x_paint
x_plasma x_quantize_rgb x_reflection3d x_rubber3d x_segment
x_select_color x_select_function1d x_select_palette x_shadebobs x_spline
x_starfield3d x_tetris x_threshold x_tictactoe x_warp
x_waves x_whirl

Command Shortcuts:

Shortcut nameEquivalent command name
hhelp
mcommand
ddisplay
d0display0
d2ddisplay2d
d3ddisplay3d
dadisplay_array
dcdisplay_camera
dfftdisplay_fft
dgdisplay_graph
dhdisplay_histogram
dpdisplay_parallel
dp0display_parallel0
dqdisplay_quiver
drgbadisplay_rgba
dtdisplay_tensors
dwdisplay_warp
eecho
iinput
iginput_glob
itinput_text
ooutput
otoutput_text
onoutputn
opoutputp
owoutputw
oxoutputx
pprint
shshared
spsample
umuncommand
upupdate
vverbose
wwindow
kkeep
knkeep_named
mvmove
nmname
=>name
rmremove
rmnremove_named
rvreverse
+add
&and
<<bsl
>>bsr
/div
==eq
>=ge
>gt
<=le
<lt
m/mdiv
%mod
m*mmul
*mul
!=neq
|or
^pow
-sub
ccut
ffill
irinrange
nnormalize
=set
acapply_channels
fcfill_color
aappend
zcrop
rresize
riresize_as_image
rr2dresize_ratio2d
r2dinresize2din
r3dinresize3din
r2doutresize2dout
r3doutresize3dout
r2dxresize2dx
r2dyresize2dy
r3dxresize3dx
r3dyresize3dy
r3dzresize3dz
ssplit
yunroll
bblur
ggradient
jimage
j3dobject3d
ttext
totext_outline
+3dadd3d
c3dcenter3d
col3dcolor3d
/3ddiv3d
db3ddouble3d
f3dfocale3d
l3dlight3d
m3dmode3d
md3dmoded3d
*3dmul3d
n3dnormalize3d
o3dopacity3d
p3dprimitives3d
rv3dreverse3d
r3drotate3d
sl3dspecl3d
ss3dspecs3d
s3dsplit3d
-3dsub3d
t3dtexturize3d
apapply_parallel
apcapply_parallel_channels
apoapply_parallel_overlap
atapply_tiles
}done
xexec
xoexec_out
llocal
qquit
ustatus
frameframe_xy
nmdnamed
xzx_crop
◀  Adding Custom Commands    |    Funny Oneliners  ▶
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.