G'MIC(1) General Commands Manual G'MIC(1) (NAME) gmic - G'MIC. (HELP) gmic: GREYC's Magic for Image Computing: 4.0.5 (https://gmic.eu) (c) 2008-2026 David Tschumperle / GREYC / CNRS. (https://www.greyc.fr) . -------------- gmic [command_1 [arg_1_1,arg_1_2,..]] .. [command_N [arg_N_1,arg_N_2, ..]] <> G'MIC . . G'MIC 4.0.5 . : https://gmic.eu/tutorial . ---------------------- * G'MIC ( ) ( ) . * <<0>> <<[0]>> . <<[1]>> <<[2]>> . * : <<[-1]>> <<[-2]>> . <<[1]>> <<[-3]>> . * <<[name]>> <> <<[a-zA-Z0-9_]>> . ( name ). * G'MIC : ( ) . * G'MIC ( ) . . ---------------------------- * G'MIC . * : - <> ( <>). - <> ( <>). - <> ( <>). <<1>> . - <> ( <>). <> <> <<3>> <<4>> . * . . * <> <> <> (spatial) <> (spectral) . G'MIC . G'MIC ( blur <> ). * G'MIC <> ( <<[-3.4E38,+3.4E38]>>) . . ( ). * . / ( <> <> <> ) . / ( Input/Output Properties ). . ------------------------------- * G'MIC (space) . . : filename.jpg blur 3,0 sharpen 10 resize 200%,200% output file_out.jpg G'MIC . * G'MIC . * <<">> . <> <<"single item">> . . ---------------- * G'MIC ( <> ). * <<->> <<-.ext>> / (stdin/stdout) <> ( <<-.jpg>> <<-.png>>). * G'MIC : - <<[selection]>> <<[selection]xN>>: N . <> ( Command Items and Selections ). - <>: <> ( <<%>> << >> <<[-1]>> ). <<[image]>> <<[image]>> ( ) . <> <<,>> <<256,256,1,3,[x,y,128]>> RGB <<256x256>> ( Mathematical Expressions ). - <<(v1,v2,..[:delimiter | axis_order])[xN]>>: <> . <<,>> ( ) <<;>> ( ) <> ( ) <<^>> ( ) . <<(1,2,3;4,5,6;7,8,9)>> x ( ) . - <<('string'[:delimiter])[xN]>>: <> . <> . <> ( <<,>> ) <> ( <<;>>) <> ( <>) <> ( <<^>>) . <<,>> <<;>> <> <<^>> <<({'string'[:delimiter]})[xN]>> ( Substitution Rules ). - <<0[xN]>>: <> (empty) . . * <> <> . <<[a-zA-Z0-9_]>> . * (local) : - <<_>> . ( global). - (shared variable) () . <<__>> ( <<__foo>>). * <<__>> (threads) / ( parallel ). . * : <<+=>> () <<-=>> () <<*=>> () <> () <<%=>> (/) <<&=>> (AND ) <<|=>> (OR ) <<^=>> () <<<<=>> <<>>=>> ( ). : <> <>. * <> <> <> . * <> <> <> . * : <> <> <<=>> ( <<+=>>). * . store ( <> ). . ----------------------------- * G'MIC <<>> . . * (<> <> ). <> <> . * G'MIC . . <<,>> . * G'MIC <<[selection]>> . <> : - <>: <<[-2]>> . - <>: <<[0]>> <<[1]>> <<[3]>>. - <>: <<[3]>> <<[6]>> ( <<[3]>> <<[4]>> <<[5]>> <<[6]>>). - <>: . - <>: . - <>: <<[0]>> <<[9]>> ( <<[0]>> <<[3]>> <<[6]>> <<[9]>>). - <>: . - <>: <<[0]>> <<[2]>> <<[3]>> <<[4]>> . - <>: . - <>: <> <>. * . <<[3-1,1-3]>> <<[1,1,1,3,2]>> <<[1-3]>> . <> . <> . * <<[-1]>> <<[-2]>> <<[-3]>> <<.>> <<..>> <<...>> . <> <> . . * G'MIC <<[selection]>> <<[0--1]>> ( input <<[-1]>> ). * <<->> G'MIC . ( ) . * G'MIC <<+>> (in-place) . * G'MIC : - (Built-in commands) . . . <> <> . - (Custom commands) G'MIC . G'MIC . . <> <> .* G'MIC (custom commands) . * G'MIC ( Adding Custom Commands ). (built-in) ( G'MIC ). 7. / (Input/Output Properties) ----------------------------------------------- * G'MIC / : - /: '.png' '.jpeg' '.gif' '.pnm' '.tif' '.bmp' ... - : '.dcm' '.hdr' '.nii' '.cube' '.pan' '.inr' '.pnk' ... - : '.mpeg' '.avi' '.mp4' '.mov' '.ogg' '.flv' ... - : '.gmz' '.cimg' '.cimgz' 'flo' 'ggr' 'gpl' '.dlm' '.asc' '.pfm' '.raw' '.txt' '.h'. - : '.off' '.obj'. * G'MIC sRGB . * '.png' '.tiff' () status . * G'MIC (3D mesh objects) G'MIC . : { magic_number; sizes; vertices; primitives; colors; opacities }. ( split3d ). * G'MIC (floating-point) . '.jpg' . G'MIC '.gmz' . * : - : 'filename.ext,[first_frame[,last_frame[, step]]]'. 'last_frame==-1' . 'step' '0' / . 'filename.avi,_fps,_codec,_keep_open' 'keep_open' { 0:No (default) | 1:Yes } . 'codec' ( http://www.fourcc.org/codecs.php ) '0' . 'keep_open' . - '.cimg[z]': .cimg 'filename.cimg,N0,N1' 'filename.cimg,N0,N1,x0,x1' 'filename.cimg,N0,N1,x0,y0,x1,y1' 'filename.cimg,N0,N1,x0,y0,z0,x1,y1,z1' 'filename.cimg,N0,N1,x0,y0, z0,c0,x1,y1,z1,c1'. '-1' . 'filename.cimg[z][,datatype]' . 'datatype' { auto | bool | uint8 | int8 | uint16 | int16 | uint32 | int32 | uint64 | int64 | float32 | float64 } . - '.raw': '.raw' 'filename.raw[,datatype][,width][,height[,depth[,dim[,offset]]]]]' . . 'filename.raw[,datatype]' . 'datatype' '.cimg[z]' . - '.yuv': 'filename.yuv,width,height[,chroma_subsampling[,first_frame[, last_frame[,step]]]'. 'chroma_subsampling' { 420 | 422 | 444 } . (chroma subsampling) 'filename.yuv[,chroma_subsampling]' . - '.tiff': tiff 'filename.tif,_first_frame,_last_frame, _step'. 'filename.tiff,_datatype,_compression, _force_multipage,_use_bigtiff' . 'datatype' '.cimg[z]' . 'compression' { none | adobe_deflate | ccitt_t4 | ccitt_t6 | ccittfax3 | ccittfax4 | ccittrle | ccittrlew | dcs | deflate | it8bl | it8ctpad | it8lw | it8mp | jbig | jp2000 | jpeg | jpg | jxl | lerc | lzma | lzw | next | ojpeg | packbits | pixarfilm | pixarlog | sgilog | sgilog24 | t43 | t85 | thunderscan | webp | zip | zstd } . 'force_multipage' { 0:No (default) | 1:Yes } . 'use_bigtiff' { 0:No | 1:Yes (default) } . - '.pdf': (rendering resolution) 'filename.pdf,resolution' 'resolution' . - '.gif': gif 'filename.gif,fps>0,nb_loops' . 'nb_loops=0' ( ). - '.jpeg' '.webp': ( ) 'filename.jpg,30' ( ). '100' . - '.png': ( ) 'filename.png,16' ( ). G'MIC . - '.mnc': (header) 'filename.mnc,header_template.mnc'. - '.pan' '.cpp' '.hpp' '.c' '.h': 'filename[,datatype]' . 'datatype' '.cimg[z]' . - '.gmic': G'MIC . . 'filename.gmic[,add_debug_info]' / 'debug_info' { 0:False | 1:True } . - 'ext:' ( 'jpg:filename') G'MIC / '.ext' . * G'MIC / . 8. (Substitution Rules) -------------------------------------- * G'MIC '$' '{}' . . * '$name' '${name}' ( 'name=value' ) . '[name]' . ( ). * G'MIC : - '$!': . - '$>' '$<': / ( ). '$>' '0' ( ) 'nb_iterations - 1' ( ) . '$<' ( 'for' 'while' '$<' 'nan' ). - '$%': '0' ( ) '1' ( ) ( '$>/($>+$<)'). - '$/': . '/' . - '$|': ( ) . - '$^': . - '$_cpus': . - '$_flags': G'MIC. - '$_host': G'MIC ( 'cli' 'gimp'). - '$_os': . - '$_path_rc': G'MIC ( ). - '$_path_user': G'MIC '.gmic' 'user.gmic' ( ). - '$_path_commands': ( ). - '$_pid': . - '$_pixeltype': (: 'float32'). - '$_prerelease': 'yymmdd'. '0' . - '$_user_agent': user-agent G'MIC (: 'gmic'). - '$_version': G'MIC ( '405'). - '$_vt100': '1' . '0' . * '$$name' '$${name}' G'MIC 'custom command' . * '${"-pipeline"}' G'MIC ( status ). '${}' . * '{:string}' . * '{/string}' (escaped) . * '{'string'[:delimiter]}' ( ) . ',' () ';' '/' '^' ' '. '{'foo'}' '102,111,111' '{'foo':;}' '102;111;111' . * '{image,feature[:delimiter]}' '[image]' . 'image' . '[-1]' . 'feature' : - 'b': ( ). - 'f': . - 'n': ( ). - 't': . - 'x': ( '.' ). - '^': ', '. - '@subset': ','. - 'feature' '[image]' ( ) . '{0, w+h}' ( Mathematical Expressions ). '_' . '{_pi}' '3.14159' ( '{pi}' '3.141592653589793' ). - 'feature' (backquote) . '{`[102,111, 111]`}' 'foo' '{`vector8(65)`}' 'AAAAAAAA' . * '{*}' '#0' ( { 0:Closed | 1:Visible } ). * '{*[index],feature1,...,featureN[:delimiter]}' '#0' ( '#index' ) . 'features' : - 'u': ( ). - 'v': ( ). - 'uv': * . - 'd': ( ). - 'e': ( ). - 'de': * . - 'w': ( ). - 'h': ( ). - 'wh': * . - 'i': X . - 'j': Y . - 'f': . - 'n': . - 't': . - 'x': X ( -1 ). - 'y': Y ( -1 ). - 'b': { 1:left-but. | 2:right-but. | 4:middle-but. }. - 'o': . - 'k': 0. - 'c': (0 1) . - 'r': . - 'm': . - 'feature' ( ) { 0:Pressed | 1:Released } . - '-' 'feature' ( ) (flush) ( ).* . '"3+8 kg = "{3+8}" kg"'. . * '{' '}' '$' '3+4 doesn't evaluate'. . (Mathematical Expressions) ---------------------------------------------- * G'MIC ( ) '{}' ( fill eval) . * ( fill eval). * . : ## : '||' ( ) '&&' ( ) '|' ( ) '&' ( ) '!=' '==' '<=' '>=' '<' '>' '<<' ( ) '>>' ( ) '-' '+' '*' '/' '%' () '^' () '!' ( ) '~' ( ) '++' '--' '+=' '-=' '*=' '/=' '%=' '&=' '|=' '^=' '>>' '<<=' ( ). ## : 'abs()', 'acos()', 'acosh()', 'arg0()', 'arg1()', 'argkth()', 'argmax()', 'argmaxabs()', 'argmin()', 'argminabs()', 'asin()', 'asinh()', 'atan()', 'atan2()', 'atanh()', 'avg()', 'bool()', 'cbrt()', 'ceil()', 'cos()', 'cosh()', 'cut()', 'deg2rad()', 'erf()', 'erfinv()', 'exp()', 'fact()', 'fibo()', 'floor()', 'frac()', 'gamma()', 'gauss()', 'gcd()', 'hypot()', 'int()', 'isconst()', 'isfinite()', 'isnan()', 'isnum()', 'isinf()', 'isint()', 'isbool()', 'isexpr()', 'isfile()', 'isdir()', 'isin()', 'kth()', 'lcm()', 'log()', 'log2()', 'log10()', 'logit()', 'max()', 'maxabs()', 'med()', 'min()', 'minabs()', 'narg()', 'prod()', 'rad2deg()', 'rol()' ( ) 'ror()' ( ) 'round()', 'sign()', 'sigmoid()', 'sin()', 'sinc()', 'sinh()', 'sqrt()', 'std()', 'srand(_seed)', 'sum()', 'tan()', 'tanh()', 'var()', 'xor()'. * 'cov(A,B,_avgA,_avgB)' 'A' 'B' ( ). * 'mse(A,B)' (MSE) 'A' 'B' . * 'atan2(y,x)' 'atan()' 'y' 'x' ( C/C++). * 'perm(k,n,_with_order)' 'k' 'n' . * 'gauss(x,_sigma,_is_normalized)' 'exp(-x^2/(2*s^2))/(is_normalized?sqrt(2*pi*sigma^2):1)' . * 'cut(x,min,_max)' 'x' '[min, max]' 'x' 'min' 'max' . * 'abscut(x,min,_max,_offset)' 'cut(abs(x) + offset,min, max)*sign(x)' . * 'narg(a_1,...,a_N)' ( 'N') . * 'arg0(i,a_0,..,a_N)' 'i' 'a_i' ( 'i' '0' 'N' ). * 'arg1(i,a_1,..,a_N)' 'i' '1' 'N' . * 'indexof(ref,a_0,..,a_N)' 'i' 'ref' 'a_k' ( 'ref' '-1'). 'i' '0' . * 'isnum()' 'isnan()' 'isinf()' 'isint()' 'isbool()' '0' () '1' () . * 'isfile('path')' ( 'isdir('path')') ( ) '0' () '1' () . * 'ispercentage(arg)' 'arg' '%' '1' () '0' () . * 'isvarname('str')' '0' () '1' () . * 'isvar(varname)' 'varname' '0' () '1' () . * 'isin(v,a_1,...,a_n)' 'v' 'a_i' '0' () '1' () . * 'isint(x,_xmin,_xmax)' 'x' '[xmin,xmax]' '1' () '0' () . * 'inrange(value,m,M,include_m,include_M)' '[m, M]' '0' () '1' () ('include_m' 'includeM' 'm' 'M' ). * 'argkth()' 'argmin()' 'argmax()' 'argminabs()' 'argmaxabs()' 'avg()' 'kth()' 'min()' 'max()' 'minabs()' 'maxabs()' 'med()' 'prod()' 'std()' 'sum()' 'var()' / . * 'vargkth()' 'vargmin()' 'vargmax()' 'vargminabs()' 'vargmaxabs()' 'vavg()' 'vkth()' 'vmin()' 'vmax()' 'vminabs()' 'vmaxabs()' 'vmed()' 'vprod()' 'vstd()' 'vsum()' 'vvar()' . * 'wave(x,type)' [-1,1] . 'type' { 0:Square | 1:Triangle | 2:Ascending sawtooth | 3:Descending sawtooth | 4:Sine } . * 'round(value,rounding_value,direction)' . 'direction' { -1:To- lowest | 0:To-nearest | 1:To-highest } . * 'softmax(V,_temperature)' 'softmin(V,_temperature)' softmax softmin 'V' . 'temperature' 1 . * 'softargmax(V,_temperature)' 'softargmin(V,_temperature)' softargmax softargmin 'V' . 'temperature' 1 . * 'lerp(a,b,t)' 'a*(1-t)+b*t' . * 'swap(a,b)' . 'swap(#ind,offset0,offset1,_is_vector)' '[ind]' 'offset0' 'offset1' . ## : . * 'l': . * 'k': '[0,l-1]'. * 'w': ( '0'). * 'h': ( '0'). * 'd': ( '0'). * 's': ( '0'). * 'r': ( '0'). * 'wh': 'width*height'. * 'whd': 'width*height*depth'. * 'whds': 'width*height*depth*spectrum' ( ). * 'ia' 'ic' 'id' 'im' 'iM' 'in' 'ip' 'is' 'iv': L2 ( '0'). * 'xm' 'ym' 'zm' 'cm': ( '0'). * 'xM' 'yM' 'zM' 'cM': ( '0'). * ( ) . 'resize(#ind,..)' . 'l()' 'w(_#ind)' 'h(_#ind)' ... 's(_#ind)' 'in(_#ind)' . * 'i': ( '(x,y,z, c)') ( '0'). * 'iN': N ( '(x,y,z,N)' '0'). 'N' '[0,9]' . * 'R' 'G' 'B' 'A' 'i0' 'i1' 'i2' 'i3' . * 'I': ( '0'). ( 'I' = '[ R,G,B ]' 'RGB'). * '_0' '_1': '0' '1' . * '#ind' '[ind]' ( ). 'ia#0' ). * 'x': ( '0'). * 'y': ( '0'). * 'z': () ( '0'). * 'c': ( '0'). * 't': ('0' (master thread) ). * 'n': ( 't' '0' 'n-1' ). * 'e': e '2.71828...'. * 'pi': pi ( ) '3.1415926...'. * 'eps': 1.0 double. * 'u': '[0,1]' . * 'v': '0' '1' . * 'g': 1 ( '[-6,6]'). * 'interpolation': ( ). '0' . * 'boundary': ( ). '0' . * '' G'MIC: 256,128 fill {w} 256x128 256 . ## : . ( 'abs([-1,2,-3])' '[1,2,3]' ). : * '[a0,a1,...,aN-1]' 'N' 'ak' . * 'vectorN(a0,a1,,...,aN-1)' 'ak' . * 'vector(#N,a0,a1,,...,aN-1)' 'N' . * 'ak' . * 'ak' 'X' 'X[k]' . * '[X[p],X[p+s]...X[p+s*(q-1)]]' ( 'q') 'X' 'X[p,q,s]' . * / '==' '!=' . * : 'cross(X, Y)' ( ) 'dot(X,Y)' ( ) 'size(X)' ( ) 'sort(X,_is_increasing,_starting_index,_nb_elts,_size_elt, _sort_index)' ( ) 'reverse(A)' ( ) 'map(X,P,_nb_channelsX,_nb_channelsP,_boundary_conditions)' 'shift(A,_length,_boundary_conditions)' 'same(A,B,_nb_vals, _is_case_sensitive)' ( ). * 'normP(u1,...,un)' LP ('P' 'inf' 'norm1()'). * 'normp(V,_p)' Lp 'V' . 'p' . 'p' 2 . * 'unitnorm(V,_p)' 'V/normp(V)' 'V' . 'p' 2 . * 'resize(A,size,_interpolation,_boundary_conditions)' 'A' . 'interpolation' { -1:None (memory content) | 0:None | 1:Nearest | 2:Average | 3:Linear | 4:Grid | 5:Bicubic | 6:Lanczos } 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . * 'find(A,B,_starting_index,_search_step,_max_iterations)' 'B' 'A' ( '-1' 'B' 'A' ) . 'A' '#ind' . * ( 'fill') () '(x,y,z)' . 'c' .## : <<2>>- / : <<**>> ( ) <> ( ) <<^^>> ( ) <<**=>> (- ) <> (- ) <<^^=>> (- ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ) <> ( ). ## : <>- <> <> / : <<*>> ( ) <> () <> ( ) <> ( / ) <> ( n n) <> ( ) <> ( ) <> <> ( ) <> ( ) <> ( A.X = B) <> ( ) <> ( ) <> ( ). <> <<1>> . ## : : * <> <> <<(w,h,d,s)>> . <> <> (<> <> ). ( <> <> <> <>) . * <> <> . <> <<(ow,oh,od,os)>> <<(nw,nh,nd, ns)>> . * <> (warped) <> ( <<(wA,hA,dA,sA)>> <<(wA*hA*dA*sA)>> ) <> ( <<(wB,hB,dB,sB)>>) . <<(wB,hB,dB,sA)>> . warp . * <> <> <

> . index . * <> <> ( <<(wA,hA,dA,sA)>> <>) . permute . * <> <> ( <<(wA,hA,dA,sA)>> <>) . mirror . * <> <> ( <<(wA,hA,dA,sA)>> <>) . cumulate . * <> <> . histogram . * <> <> . equalize . * <> <> . normalize . * <> <> () <> . mproj . * <> <<[R,I]>> <<(w,h, d,s)>> . fft <> . <> <> . fft ifft . * <> <> <<(wA,hA,dA,sA)>> . shift . * <> <> . noise . * <> <> . rand . ## : . : * <<['string']>> <<'string'>> <> ( <<'foo'>> <<[ 102,111,111 ]>> ). * <<_'character'>> (ASCII) ( <<_'A'>> <<65>> ). * : <<['']>> <<''>> <<0>> . * <> <> . * <> <> . * <> <> <> . <> { <-1:0-Padding of integers | -1:Auto-reduced | 0:All | >0:Max number of digits } . * <> . * <> / . ## : ( ) <<[ind]>> . ( <<[ind]>> ). . : * <>: <<[ind]>> . * <>: <<[ind]>> . * <>: <> <> <> <<[ind]>>. * <>: <> <> <<[ind]>>. * <>: <> <<[ind]>> . * <> <> min-heap ( ) . * <> <> <> <> . <> . * <>: <> <> ( ) <<[ind]>> . * <>: - <>. * k- <<[ind]>> <> ( ) <> ( ) . <<#ind>> <<#-1>> . ## : * <<;>>: . . <<1;2;pi>> <> . * <<=>>: . ( ) . . <<;>> t = cos(x); 3*t^2 + 2*t + 1 . * <> ( 'const foo = pi/4;') . . (JIT) . ## : * <>: <> . * <> <>: . <> { 0:None | 1:Return -1 if out-of-range } . * <> <> <> <>. : <>. * <> <> <<(w,h,d,s)>> . * <> <>: <<0...max>> <> . () . * <> <> . * <> <>: ( ) . * <>: <<(a,b,c,d)>> ( <<0>>). <> { 0:Nearest neighbor | 1:Linear | 2:Cubic } . <> { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . <> <> <> <> <> <>. fill 0.5*(i(x+1)-i(x-1)) X . * <> <<(x+dx,y+dy,z+dz,c+dc)>> ( ). * <> <> ( <<0>> ). * <> <<(x,y,z,c)>> . * <> <> <> <> <<[ind]>> . * <> <> <> <> ( <<[ R,G,B ]>> <<(a,b,c)>> ). * <> <<[ind]>> ( <> ) . <<(x,y,z,c)>> <<(dx,dy,dz,dc)>> . ( <> ). * <> <> <<(w,h,d,s)>> . * <> <> <<[ind]>> ( <> ) <<(x,y, z,c)>> . * <> <> <> <<(w,h,d,s)>> . * <> <<[ind]>> ( <> ) . <> 2 . * <> <<[ind]>> ( <> ) . <> 2 . * <> <<[ind]>> ( <> ) . * <> <<[ind]>> ( <> ) . * <> (flood fill) <<[ind]>> ( <> ) . flood . * <> . ( ) <> <> <> <> <> <> <> . * <>: <> { 0:False | other:True } <> <> . <> <<0>> . <> . G'MICfill if(!(x%10),255,i) fill x%10?i:255 . * 'do(expression,_condition)' 'expression' 'condition' () ( 'condition' 'break()' ). : if(N<2,N,n=N-1;F0=0;F1=1;do(F2=F0+F1;F0=F1;F1=F2,n=n-1)) N- 'N>=0' ( '46368' 'N=24'). 'do(expression,condition)' . 'expression' . * 'for(init,condition,_procedure,body)' 'init' 'condition' ( ) 'body' ( 'procedure') . 'nan' . 'body' . : if(N<2,N,for(n=N;F0=0;F1=1,n=n-1,F2=F0+F1;F0=F1;F1=F2)) 'N'- 'N>=0' ( '46368' 'N=24'). * 'while(condition,expression)' 'for(init,condition,expression)' . * 'repeat(nb_iters,expr)' 'fill(nb_iters,iter_name,expr)' 'nb_iters' 'expr' 'V = vector16(); repeat(16,k,V[k] = k^2 + k + 1);'. : 'for (iter_name = 0, iter_name 'break()' 'continue()' . * 'fsize('filename')' 'filename' ( '-1'). * 'date(attr,'path')' 'path' ( ) 'attr' { 0:Year | 1:Month | 2:Day | 3:Day of week | 4:Hour | 5:Minute | 6:Second } . * 'date(_attr)' () ( { 0...6:Same meaning as above | 7:Milliseconds }). * 'epoch(_year,_month,_day,_hour,_minute,_second)' Epoch . Epoch . * 'print(expr1,expr2,...)' 'print(#ind)' ( ) ( 'nan') . 'prints(expr)' ( 'prints('Hello')'). * 'debug(expression)' ( ). * 'display(_X,_w,_h,_d,_s)' 'display(#ind)' 'X' ( ) . . * 'begin(expression)' 'end(expression)' ( 'fill ">begin(foo = 0); ++foo"'). * 'copy(dest,src,_nb_elts,_inc_d,_inc_s,_opacity)' 'nb_elts' 'src' 'dest' 'inc_d' 'inc_s' . * 'stats(_#ind)' '[ind]' '[ im,iM,ia,iv,xm,ym,zm,cm,xM,yM,zM,cM,is,ip,in ]' ( ). * 'stats(X,w,h,d,s)' 'X' '(w,h,d,s)' . * 'ref(expr,a)' 'expr' 'a' . * 'unref(a,b,...)' . * 'breakpoint()' (breakpoint) ( ). * '_(comment) expr' 'expr' ( ). * 'run('pipeline')' G'MIC . * 'set('variable_name',A)' G'MIC '$variable_name' 'A' . 'A' . * 'store('variable_name',A,_w,_h,_d,_s,_is_compressed)' 'A' '(w,h,d,s)' G'MIC '$variable_name' . ( store ). * 'get('variable_name',_size,_return_as_string)' 'size' ( 'size' ) . * 'name(_#ind,size)' 'size' '[ind]' ( 'ind' ). * 'correlate(I,wI,hI,dI,sI,K,wK,hK,dK,sK,_boundary_conditions,_is_normalized,_channel_mode,_xcenter,_ycenter,_zcenter,_xstride,_ystride,_zstride,_xdilation,_ydilation,_zdilation,_xoffset,_yoffset,_zoffset,_xsize,_ysize,_zsize)' 'I' '(wI,hI,dI,sI)' 'K' '(wK,hK,dK,sK)' ( 'correlate' ). 'convolve(...)' 'I' 'K' . ## : * '=' : foo(x,y) = cos(x + y); result = foo(1,2) + foo(2,3) * ( 'abs()') . * . . * . . : foo(x) = x + x; z = 0; foo(++z) '2' '4' . * '#' . : foo(x,y) = x*y; foo(1+2,3) '9' ( '(1+2)*(3)' ) : foo(x,y) = x#*y#; foo(1+2,3) '7' ( '1+2*3' ). * '#' . : str(N) = ['I like N#']; * (variadic) '...' . : foo(args...) = sum([ args ]^2); 'foo(1,2,3)' '14' 'foo(4,5)' '41' . ## (in- place): * 'fill' 'eval' 'input' . * G'MIC (in-place) ( ). 'fill' 'eval' : - '*': . - ':': . - '+': ( - scanline). - '>': ( ). - '<': ( ). * ( ). * 'critical(expr)' 'expr' () . * 'begin_t(expr)' 'end_t(expr)' ( ) . * 'merge(variable,operator)' . * 'i(_#ind,x,_y,_z,_c)=value' 'j(_#ind,x,_y,_z,_c)=value' 'i[_#ind,offset]=value' 'j[_#ind,offset]=value' '[ind]' ( '#ind' ) / ( 'i(...)' 'i[...]') '(x,y,z,c)' ( 'j(...)' 'j[...]'). 'value' . 10. Adding Custom Commands ---------------------- * G'MIC . * : command_name: command_definition command_definition (continuation) * G'MIC '$HOME/.gmic' ( Unix) '%USERPROFILE%ser.gmic' ( Windows) . 'gmic' 'cli_start' . * '[a- zA-Z0-9_]' . * '# comment' G'MIC . * '$-expressions' : - '$*' (verbatim) ( ). - '$"*"' ',' ( ). - '$#' ( ) . - '$[]' . - '$?' '$[]' . - '$i' '${i}' 'i'- . '${-j}' 'j'- . '$0' . - '${i=default}' '$i' ( ) 'default' ('default' '$-expression' ). - '${subset}' ( ',') . '${2--2}' . '${^0}' ( '$*' ). - '$=var' '$i' 'var$i' ( i '[0...$#]'). . '[a-zA-Z0-9_]' . * '$-expressions' '$' '$' . '$' ( '$""1'). * ',' flower ,,3 ( '${1=default}') . * G'MIC . * '+command' : +command_name: command_definition * +- '+' . * +- 'command' '+command' . 11. (List of Commands) ---------------- G'MIC . '[]' '_' '[image]' 'image' . '[]' . '[0, 255]' . ( 'normalize 0,255'). << >> G'MIC . . (escape) . 11.1. (Global Options) -------------- debug (+): (). G'MIC (stdout) . . h: 'help'. help: command | (no arg) . ( 'h'). version: stdout. 11.2. / (Input / Output) -------------- camera (+): _camera_index>=0,_nb_frames>0,_skip_frames>=0,_capture_width>=0,_capture_height>=0 . 'nb_frames==0' . OpenCV ( G'MIC ). : 'camera_index=0' ( ) 'nb_frames=1' 'skip_frames=0' 'capture_width=capture_height=0' ( ). m (+): 'command'. command (+): _add_debug_info={ 0:No | 1:Yes },{ filename | http[s]://URL | "string" } G'MIC URL . ( 'm'). 'command' . ':' . : 'add_debug_info=1' ( "string" 'add_debug_info=0' ). : [#1] image.jpg command "foo : mirror y deform $""1" +foo[0] 5 +foo[0] 15 compress_to_keypoints: _method,_max_keypoints>=0,_err_avg[%]>=0,_err_max[%]>=0,_"err_command" decompress_from_keypoints . : . 'method' { 0:PDE | 1:RBF } . '2' 'method' . * 'max_keypoints' . 'max_keypoints<0' . 'max_keypoints=0' 'no limits' ( ) . * 'err_avg' . * 'err_max' . * 'err_command' '[reference]' '[compressed]' . : 'method=3' 'max_keypoints=0' 'err_avg=1%' 'err_max=5%' 'err_command=-. [0] norm.' createdir (+): force_overwrite={ 0:No | 1:Yes },directory_path_1,_directory_path_2,... 'directory_path_k' . . : 'force_overwrite=1'. cursor (+): _mode = { 0:hide | 1:show } . ( ) . : 'mode=1'. delete (+): filename1[,filename2,...] . . d: 'display'. display: . ( 'd'). '+' ( '+display') 'stderr' 'stdout' . 0 . ( 'LMB' = 'RMB' = 'MMB' = 'MW' = ). * : 'TAB': / - 'LMB': - '0'-'9' 'ARROWS' ( '+SHIFT') 'B' 'BACKSPACE' 'C' 'E' 'END' 'H' 'HOME' 'SPACE': ( 'CTRL' ). * : 'LMB' 'MMB': (Pan) - 'RMB' 'MW': (Zoom) - 'ARROWS' ( '+SHIFT') 'HOME' 'END': - 'A': - 'C': - 'E': - - 'RETURN': - 'G': - 'H': - - 'K': - 'M': - 'N': - 'P': 'stdout' - 'PAGEUP' 'PAGEDOWN': / - 'R': - 'T': - 'V': (Crop) - 'Z': - '0'-'9': . * : 'LMB': - 'CTRL+LMB' 'MMB': - 'RMB': - 'A': - 'D': - 'F': - 'J': / - 'K': - 'O': (Outline) - 'P': 'stdout' - 'R': - 'T': - 'X': / (Bounding-box) - 'U': - 'Z': z-buffer. * : 'CTRL+LMB': . * : 'CTRL+MW': - 'X': . * / : 'CTRL+C': - 'CTRL+D': - 'CTRL+F': - 'CTRL+I': - 'CTRL+O': '.gmz' - 'CTRL+L': '.gmz' - 'CTRL+S': '.png' - 'CTRL+W': / - 'CTRL+X': . * : : - '_display_selected' . - '_display_alpha' { 0:Off | 1:On | 2:Over black | 3:Over gray | 4:Over white } ( : '0'). - '_display_background' [ 0,9 ] ( : '3'). - '_display_cursor' { 0:Off | 1:On (2D only) | 2:On (+3D volumetric images) } ( : '1'). - '_display_is_grid' { 0:Off | 1:On } ( : '1'). - '_display_is_info' { 0:Off | 1:On } ( : '1'). - '_display_normalization' { -1:Auto | 0:Off | 1:Cut | 2:Stretch channelwise | 3:Stretch global | 4: stretch (global-once) } ( : '-1'). - '_display_print_images' { 0:Off | N>0 } ( : '5'). 'N' 'stderr' 'stdout' . - '_display_3d_is_rendered' { 0:Off | 1:On } ( : '1'). - '_display_3d_rendering_mode' { 0:Dots | 1:Wireframe | 2:Flat | 3:Flat-shaded | 4:Gouraud-shaded | 5=Phong-shaded } ( : '4'). - '_display_3d_outline_mode' { 0:No- outline | 1:Black-outline | 2:Gray-outline | 3:Red-outline | 4:Green- outline | 5:Blue-outline | 6:White-outline } ( : '0'). - '_display_3d_motion_rendering_mode' { -1:Bounding-box | 0:Dots | 1:Wireframe | 2:Flat | 3:Flat-shaded | 4:Gouraud-shaded | 5=Phong-shaded } ( : '3'). - '_display_3d_motion_time_limit' . 'bounding-box' ( : '300'). - '_display_3d_side_mode' { 0:Single- sided | 1:Double-sided | 2:Single-sided (flipped) } ( : '0'). - '_display_3d_is_zbuffer' { 0:Off | 1:On } ( : '1'). - '_display_3d_focal' { <0:Perspective projection w/o sprite zooming, 0:Parallel projection | >0:Perspective projection } ( : 1.5). - '_display_3d_is_axes' { 0:Off | 1:On } ( : '1'). - '_display_3d_is_bounding_box' { 0:Off | 1:On } ( : '0'). - '_display_3d_background' [0,11] ( : '11'). - '_display_3d_pose' 12 (/). - '_display_3d_animation' { 0:Off | 1:Forward | 2:Backward } ( : '0'). - '_display_3d_animation_mode' { 0-3:X-axis | 4-7:Y-axis | 8-11:Z-axis | 12-15:XYZ-axes } ( : '4'). d0: 'display0'. display0: . da: 'display_array'. display_array: _width>0,_height>0 . : 'width=13' 'height=width'. dc: 'display_camera'. display_camera: . OpenCV ( G'MIC ). dclut: 'display_clut'. display_clut: _image_resolution>0,_clut_resolution>0 LUT . : 'image_resolution=320' 'clut_resolution=33'. : [#1] clut tealorange clut summer clut 60s display_clut 400 dfft: 'display_fft'. display_fft: . ( 'dfft'). : [#1] image.jpg +display_fft dg: 'display_graph'.display_graph: _width>=0,_height>=0,_plot_type,_vertex_type,_xmin,_xmax,_ymin,_ymax,_xlabel,_ylabel,_frame_size>=0 . 'plot_type' { 0:None | 1:Lines | 2:Splines | 3:Bar } . 'vertex_type' { 0:None | 1:Points | 2,3:Crosses | 4,5:Circles | 6,7:Squares } . 'xmin' 'xmax' 'ymin' 'ymax' xy . 'width' 'height' '0' . : 'width=0' 'height=0' 'plot_type=1' 'vertex_type=1' 'xmin=xmax=ymin=ymax=0 (auto)' 'xlabel="x-axis"' 'ylabel="y-axis"' 'frame_size=32'. : [#1] 128,1,1,1,'cos(x/10+u)' +display_graph 400,300,3 dh: 'display_histogram'. display_histogram: _width>=0,_height>=0,_clusters>0,_min_value[%],_max_value[%],_show_axes={ 0:No | 1:Yes },_expression. (histogram) . (slice) . 'expression' . ( 'dh'). 'width' 'height' '0' . : 'width=0' 'height=0' 'clusters=256' 'min_value=0%' 'max_value=100%' 'show_axes=1' 'expression=i'. : [#1] image.jpg +display_histogram 512,300 display_parametric: _width>0,_height>0,_outline_opacity,_vertex_radius>=0,_is_antialiased={ 0:No | 1:Yes },_is_decorated={ 0:No | 1:Yes },_xlabel,_ylabel . . (R,G,B) . 'outline_opacity>1' 'outline_opacity-1' (opacity) . : 'width=512' 'height=width' 'outline_opacity=3' 'vertex_radius=0' 'is_antialiased=1' 'is_decorated=1' 'xlabel="x-axis"' 'ylabel="y-axis"'. : [#1] 1024,1,1,2,'t=x/40;(!c?sin(t):cos(t))*(exp(cos(t))-2*cos(4*t)-sin(t/12)^5)' display_parametric 512,512 [#2] 1000,1,1,2,u(-100,100) quantize 4,1 noise 12 channels 0,2 +normalize 0,255 append c display_parametric 512,512,0.1,8 display_polar: _width>32,_height>32,_outline_type,_fill_R,_fill_G,_fill_B,_theta_start,_theta_end,_xlabel,_ylabel . 'outline_type' { r<0:Dots with radius -r | 0:No outline | r>0:Lines+dots with radius r } . 'fill_color' { -1:No fill | R,G,B:Fill with specified color } . : 'width=500' 'height=width' 'outline_type=1' 'fill_R=fill_G=fill_B=200' 'theta_start=0' 'theta_end=360' 'xlabel="x-axis"' 'ylabel="y-axis"'. : [#1] 300,1,1,1,'0.3+abs(cos(10*pi*x/w))+u(0.4)' display_polar 512,512,4,200,255,200 [#2] 3000,1,1,1,'x^3/1e10' display_polar 400,400,1,-1,,,0,{15*360} dq: 'display_quiver'. display_quiver: _size_factor>0,_arrow_size>=0,_color_mode={ 0:Monochrome | 1:Grayscale | 2:Color } . ( 'dq'). : 'size_factor=16' 'arrow_size=1.5' 'color_mode=1'. : [#1] image.jpg +luminance gradient[-1] xy rv[-2,-1] *[-2] -1 a[-2,-1] c crop 60,10,90,30 +display_quiver[1] , drgba: 'display_rgba'. display_rgba: _background_RGB_color RGBA . ( 'drgba'). : 'background_RGB_color=undefined' (). : [#1] image.jpg +norm threshold[-1] 40% blur[-1] 3 normalize[-1] 0,255 append c display_rgba dt: 'display_tensors'. display_tensors: _size_factor>0,_ellipse_size>=0,_color_mode={ 0:Monochrome | 1:Grayscale | 2:Color },_outline>=0 . ( 'dt'). : 'size_factor=16' 'ellipse_size=1.5' 'color_mode=2' 'outline=2'. : [#1] image.jpg +diffusiontensors 0.1,0.9 rescale2d. 64 +display_tensors. 16,2 : https://gmic.eu/oldtutorial/_display_tensors dv3d: 'display_voxels3d'. display_voxels3d: . ( 'dv3d'). dw: 'display_warp'. display_warp: _cell_size>0 (warping fields) . ( 'dw'). : 'cell_size=15'. : [#1] 400,400,1,2,'x=x-w/2;y=y- h/2;r=sqrt(x*x+y*y);a=atan2(y,x);5*sin(r/10)*[cos(a),sin(a)]' +display_warp 10 e (+): 'echo'. echo (+): message . ( 'e'). ( ) (call stack) . '+' ( '+echo') stderr stdout . echo_file: filename,message . ( 'echo' ). font: { 'Font_name' | font_number | font.gmz },_font_height[%]>0,_is_bold={ 0:No | 1:Yes } ( ) 'text' . 'Font name' { Acme | Arial | ArialBlack | BlackOpsOne | BlackChancery | CabinSketch | Caprasimo | CarnevaleeFreakshow | CheeseBurger | Cheque | ChequeBlack | Chlorinar | ComicSansMS | CourierNew | Creepster | Georgia | Hidayatullah | Impact | Jaro | Lobster | LuckiestGuy | Macondo | MedievalSharp | OdinRounded | Oswald | PalatinoLinotype | PlayfairDisplay | Roboto | Satisfy | Sofia | SundayMilk | TexGyreAdventor | TimesNewRoman | TitanOne | Typewriter | Verdana } . 'font.gmz' 'font2gmz' . : 'font_height=64' 'is_bold=0'. : [#1] 400,300,1,3 text "Hello World!",0.5~,0.5~,${"font font2gmz: _font_name,_font_size>0,_font_qualifier G'MIC 'text' . 'font_name' 'font.ttf' 'Google Font Name' . 'cutycapt' . : 'font_size' . : 'font_name=Sofia' 'font_size=24' 'font_qualifier=""'. function1d: 0<=smoothness<=1,x0>=0,y0,x1>=0,y1,...,xn>=0,yn (xk,yk) [0,max(xk)] ( xk ). : [#1] function1d 1,0,0,10,30,40,20,70,30,80,0 +display_graph 400,300 identity: _width>=0,_height>=0,_depth>=0 . : 'height=width' 'depth=1'. : [#1] identity 5,1 identity 8,8 i (+): 'input'. input (+): [type:]filename | [type:]http://URL | [selection]x_nb_copies>0 | { width[%]>0 | [image_w] },{ _height[%]>0 | [image_h] },{ _depth[%]>0 | [image_d] },{ _spectrum[%]>0 | [image_s] },_{ value1,_value2,... | 'formula' } | (value1{,|;|/|^}value2{,|;|/|^}...[:{x|y|z|c|,|;|/|^}]) | 0 [index] . 'formula' . '0' 'empty' . ( 'i'). : 'nb_copies=1' 'height=depth=spectrum=1' 'value1=0'. : [#1] input image.jpg [#2] input (1,2,3;4,5,6;7,8,9^9,8,7;6,5,4;3,2,1) [#3] image.jpg (1,2,3;4,5,6;7,8,9) (255^128^64) 400,400,1,3,'(x>w/2?x:y)*c' : https://gmic.eu/tutorial/input input_565: filename,width>0,height>0,reverse_endianness={ 0:No | 1:Yes } RGB-565 . : 'reverse_endianness=0'. ib: 'input_bytes'. input_bytes: filename . ( 'ib'). input_csv: "filename",_delimiter,_read_data_as={ 0:Numbers | 1:Strings } .csv . 'WxH' 'I(x,y)' ( ) . : 'delimiter=,' 'read_data_as=1'. input_cube: "filename",_convert_1d_cluts_to_3d={ 0:No | 1:Yes }. CLUT .cube ( CLUT Adobe). : 'convert_1d_cluts_to_3d=0'.input_flo: "filename" (optical flow) .flo ( vision.middlebury.edu). ig: 'input_glob'. input_glob: pattern glob . ( 'ig'). input_gpl: filename .gpl. input_cached: "basename.ext",_downloading_from_gmic_server G'MIC . 'try_downloading=1' G'MIC '${-path_cache}' . . 'downloading_from_gmic_server' { 0:No | 1:Yes, if file not found | 2:Yes, if file not in regular cache folder } . : 'try_downloading_from_gmic_server=1'. in: Shortcut for command 'input_normalized'. input_normalized: filename [0,255]. ( 'in'). input_obj: filename Wavefront .obj. it: Shortcut for command 'input_text'. input_text: filename . ( 'it'). lorem: _width>0,_height>0 . : 'width=height=800'. network (+): mode={ -1=Disabled | 0:Enabled w/o timeout | >0:Enabled w/ specified timeout in seconds } / (timeout) . ( 'enabled w/o timeout' ). o (+): 'output'. output (+): [type:]filename,_format_options . ( 'o'). : 'format_options'=(). output_565: "filename",reverse_endianness={ 0:No | 1:Yes } RGB-565. : 'reverse_endianness=0'. output_csv: "filename",_delimiter,_write_data_as={ 0:Numbers | 1:Strings } ascii .csv. : 'delimiter=,' 'write_data_as=1'. output_cube: "filename" CLUT .cube ( Adobe CLUT). output_flo: "filename" (optical flow) .flo ( vision.middlebury.edu). output_ggr: filename,_gradient_name .ggr ( GIMP). . output_gmz: filename,_datatype .gmz ( G'MIC). 'datatype' { bool | uint8 | int8 | uint16 | int16 | uint32 | int32 | uint64 | int64 | float32 | float64 } . output_obj: filename,_save_materials={ 0:No | 1:Yes } Wavefront. ('.mtl') (texture) 'save_materials' '1' . : '.obj' . : 'save_materials=1'. ot: 'output_text'. output_text: filename . ( 'ot'). on: 'outputn'. outputn: filename,_index repeat...done. ( 'on'). op: 'outputp'. outputp: prefix . ( 'op'). : 'prefix=_'. ow: 'outputw'. outputw: . ( 'ow'). ox: Shortcut for command 'outputx'. outputx: extension1,_extension2,_...,_extensionN,_output_at_same_location={ 0:No | 1:Yes } N . ( 'ox'). : 'output_at_same_location=0'. parse_cli: _output_mode,_{ * | command_name } '@cli' . 'output_mode' { ascii | bashcompletion | html | images | print } . : 'output_mode=print' 'command_name=*'. parse_gmd: (tokenize) G'MIC . gmd2html: _include_default_header_footer={ 0:None | 1:Reference | 2:Tutorial | 3:News } | (no arg) gmd html. : 'include_default_header_footer=1'. gmd2ascii: _max_line_length>0,_indent_forced_newlines>=0 | (no arg) gmd ascii. : 'max_line_length=80' 'indent_forced_newline=0'. parse_gui: _outputmode,_{ * | filter_name} . 'outputmode' { gmicol | images | json | list | print | strings | update | zart } . ('outputmode' ): . 'parse_gui_outputmode' : . . 'parse_gui_parseparams_outputmode' (): 0 1 . (). . 'parse_gui_trigger_outputmode' (): . 'parse_gui_outputmode' : '$_nb_filters': . '$_nongui' ( ): '#@gui' . ' * '$_fF_name' : . * '$_fF_path' : . * '$_fF_locale' : (locale) ( ). * '$_fF_command' : . * '$_fF_command_preview' : ( ). * '$_fF_zoom_factor' : ( ). * '$_fF_preview_accuracy' : ( { 0:Does not support zoom in/out | 1:Support zoom in/out | 2:Pixel-perfect } ). * '$_fF_input_mode' : ( ). * '$_fF_hide' : ( ). * '$_fF_nb_params' : . ' * '$_fF_pP_name' : . * '$_fF_pP_type' : . * '$_fF_pP_responsivity' : ( { 0:No | 1:Yes } ). * '$_fF_pP_randomizable' : ( { 0:No | 1:Yes } ). * '$_fF_pP_visibility' : . * '$_fF_pP_propagation' : . * '$_fF_pP_nb_args' : . ' * '$_fF_pP_aA' : : 'filter_name=*' 'output_format=print'. pass (+): _shared_state={ -1:Status only | 0:Non-shared (copy) | 1:Shared | 2:Adaptive } . ( ) . ( ) () . 'pass' . (status) . : 'shared_state=2'. : [#1] command "average : pass$""1 add[^-1] [-1] remove[-1] div 2" sample ? +mirror y +average[0] [1]plot: _plot_type,_vertex_type,_xmin,_xmax,_ymin,_ymax,_exit_on_anykey={ 0:No | 1:Yes } ( [0] ). 'plot_type' { 0:None | 1:Lines | 2:Splines | 3:Bar } . 'vertex_type' { 0:None | 1:Points | 2,3:Crosses | 4,5:Circles | 6,7:Squares } . 'xmin' 'xmax' 'ymin' 'ymax' xy . : 'plot_type=1' 'vertex_type=1' 'xmin=xmax=ymin=ymax=0 (auto)' 'exit_on_anykey=0'. poincare_disk: _size>=0,_p>2,_q>2,_angle,_tiling={ 0:Triangular | 1:Polygonal },_nb_max_iter>=0,_xmin,_ymin,_xmax,_ymax . '[x,y,it]' . : 'size=1024' 'p=5' 'q=3' 'angle=0' 'tiling=0' 'nb_max_iter=20' 'xmin=ymin=-1' 'xmax=ymax=1'. : [#1] repeat 4 { poincare_disk 1024,{3+$>} channels[-1] 2 mod[-1] 3 neq[-1] 2 } rescale2d 50% portrait: _size>0 . : 'size=800'. p: 'print'. print: (stderr). ( 'p'). '+' ( '+print') 'stderr' 'stdout' . random_patches: _nb_patches>0,_patch_size>0 . : 'nb_patches=16' 'patch_size=64'. : [#1] random_patches 16,64 split z append_tiles , random_pattern: _width>0,_height>0,_min_detail_level>=0 RGB . : 'width=height=512' 'min_detail_level=2'. : [#1] repeat 6 { random_pattern 256 } screen (+): _x0[%],_y0[%],_x1[%],_y1[%] . select: feature_type,_X[%]>=0,_Y[%]>=0,_Z[%]>=0,_exit_on_anykey={ 0:No | 1:Yes },_is_multiaxes_selection={ 0:No | 1:Yes } ( [0] ). 'feature_type' { 0:Point | 1:Segment | 2:Rectangle | 3:Ellipse } . 'X' 'Y' 'Z' . ( 'feature_type==0') ( 'feature_type!=0') . : 'feature_type=2' 'X=Y=Z=50%' 'exit_on_anykey=0' 'is_multiaxes_selection=1'. serialize (+): _datatype,_is_compressed={ 0:No | 1:Yes },_store_names={ 0:No | 1:Yes } . 'datatype' { auto | uint8 | int8 | uint16 | int16 | uint32 | int32 | uint64 | int64 | float32 | float64 } . 'datatype' . [0,255] unsigned char ( .cimg[z] .gmz ). 'store_names' '1' .gmz ( .cimg[z]). : 'datatype=auto' 'is_compressed=1' 'store_names=1'. : [#1] image.jpg +serialize uint8 +unserialize[-1] shape_circle: _size>=0 . : 'size=512'. : [#1] shape_circle , shape_cupid: _size>=0 . : 'size=512'. : [#1] shape_cupid , shape_diamond: _size>=0 . : 'size=512'. : [#1] shape_diamond , shape_dragon: _size>=0,_recursion_level>=0,_angle . : 'size=512' 'recursion_level=18' 'angle=0'. : [#1] shape_dragon , shape_fern: _size>=0,_density[%]>=0,_angle,0<=_opacity<=1,_type={ 0:Asplenium adiantum-nigrum | 1:Thelypteridaceae } . : 'size=512' 'density=50%' 'angle=30' 'opacity=0.3' 'type=0'. : [#1] shape_fern , shape_gear: _size>=0,_nb_teeth>0,0<=_height_teeth<=100,0<=_offset_teeth<=100,0<=_inner_radius<=100 . : 'size=512' 'nb_teeth=12' 'height_teeth=20' 'offset_teeth=0' 'inner_radius=40'. : [#1] shape_gear , shape_heart: _size>=0 . : 'size=512'. : [#1] shape_heart , shape_hilbert: _size>=0,_nb_recursions>=0 . : 'size=512' 'nb_recursions=5'. : [#1] shape_hilbert , shape_menger: _nb_iterations>=0 . : 'nb_iterations=3'. : [#1] shape_menger 4 surfels3d , color3d 200 m3d 3 shape_mosely: _nb_iterations>=0 . : 'nb_iterations=3'. : [#1] shape_mosely 4 surfels3d , color3d 200 m3d 3 shape_peano: _size>=0,_nb_recursions>=0 . : 'size=512' 'nb_recursions=3'. : [#1] shape_peano , shape_polygon: _size>=0,_nb_vertices>=3,_angle . : 'size=512' 'nb_vertices=5' 'angle=0'. : [#1] repeat 6 { shape_polygon 256,{3+$>} } shape_rays: _size>=0,_xcenter[%],_ycenter[%],_branches>0,_angle[%],_twist,0<=_perspective<=1,_is_antialias={ 0:No | 1:Yes } . : 'size=512' 'xcenter=50%' 'ycenter=50%' 'branches=7' 'angle=50%' 'twist=0' 'perspective=0.35' 'is_antialias=0'. : [#1] shape_rays 400,50%,50%,7 shape_rays 400,50%,50%,3,0,3 shape_snowflake: size>=0,0<=_nb_recursions<=6 . : 'size=512' 'nb_recursions=5'. : [#1] repeat 6 { shape_snowflake 256,$> } shape_star: _size>=0,_nb_branches>0,0<=_thickness<=1 . : 'size=512' 'nb_branches=5' 'thickness=0.38'. : [#1] repeat 9 { shape_star 256,{$>+2} } sh (+): 'shared'. shared (+): x0[%],x1[%],y[%],z[%],c[%] | y0[%],y1[%],z[%],c[%] | z0[%],z1[%],c[%] | c0[%],c1[%] | c0[%] | ( ) ( ///) . . ( 'sh'). : [#1] image.jpg shared 1 blur[-1] 3 remove[-1] [#2] image.jpg repeat s { shared 25%,75%,0,$> mirror[-1] x remove[-1] } : https://gmic.eu/oldtutorial/_shared sp: 'sample'. sample: _name1={ ? | apples | balloons | barbara | boats | bottles | butterfly | cameraman | car | cat | cliff | chick | colorful | david | dog | duck | eagle | elephant | earth | flower | fruits | gmicky | gmicky_mahvin | gmicky_wilber | greece | gummy | house | inside | landscape | leaf | lena | leno | lion | mandrill | monalisa | monkey | parrots | pencils | peppers | portrait0 | portrait1 | portrait2 | portrait3 | portrait4 | portrait5 | portrait6 | portrait7 | portrait8 | portrait9 | roddy | rooster | rose | square | swan | teddy | tiger | tulips | wall | waterfall | zelda },_name2,...,_nameN,_width={ >=0 | 0 (auto) },_height = { >=0 | 0 (auto) } | (no arg) RGB ( ). ( 'sp'). 'name' . : [#1] repeat 6 { sample } srand (+): value | (no arg) (seed) . . store (+): _is_compressed={ 0:No | 1:Yes },variable_name1,_variable_name2,... . . ( '+store[selection]' ). . . 'input $variable_name' . : 'is_compressed=0'. : [#1] sample eagle,earth store img1,img2 input $img2 $img1 : https://gmic.eu/tutorial/store testimage2d: _width>0,_height>0,_spectrum>0 (2D). : 'width=512' 'height=width' 'spectrum=3'. : [#1] testimage2d 512 um: 'uncommand'. uncommand (+): command_name[,_command_name2,...] | * . '*' . ( 'um'). uniform_distribution: nb_levels>=1,spectrum>=1 spectrum-d [0,1]^spectrum. : [#1] uniform_distribution 64,3 * 255 +distribution3d circles3d[-1] 10 unserialize (+): 'serialize'. up: 'update'. update: G'MIC. ( 'up'). v (+): 'verbose'. verbose (+): level | { + | - } / (verbosity). 0 . ( 'v'). 'level>0' (log) G'MIC (stderr) . : 'level=1'. wait (+): delay | (no arg) ( ) 'wait'. . 'delay' { <0:Delay+flush events | 0:Event | >0:Delay } . ( ) . 'delay' ('hard') . : 'delay=0'. warn (+): _force_visible={ 0:No | 1:Yes },_message (stderr). ( ) (call stack) . w (+): 'window'. window (+): _width[%]>=-1,_height[%]>=-1,_normalization,_fullscreen,_pos_x[%],_pos_y[%],_title . ( 'w'). 'width' 'height' -1 . 'pos_x' 'pos_y' . . 'width'=0 'height'=0 . 'normalization' { -1:Keep same | 0:None | 1:Always | 2:1st-time | 3:Auto } . 'fullscreen' { -1:Keep same | 0:No | 1:Yes } . 'w0' ( 'w') 'w1' ... 'w9' 'w' . 'window' . : 'width=height=normalization=fullscreen=-1' 'title=(undefined)'. 11.3. (List Manipulation) ----------------- k (+): 'keep'. keep (+): . ( 'k'). : [#1] image.jpg split x keep[0-50%:2] append x [#2] image.jpg split x keep[^30%-70%] append x kn: 'keep_named'. keep_named: "name1","name2",... . . ( 'kn'). mv (+): 'move'. move (+): position[%] . 'position-1' 'position' . move ( () ). ( 'mv'). : [#1] image.jpg split x,3 move[1] 0 [#2] image.jpg split x move[50%--1:2] 0 append x nm (+): 'name'. => (+): 'name'. name (+): "name1","name2",...,"nameN" . * '[-N--1]' 'N' . * 'N' . * 'N' 'name(selection[k]) = arg[k%N]'. ( '=>'). : [#1] image.jpg name image blur[image] 2 : https://gmic.eu/tutorial/name rm (+): 'remove'. remove (+): . ( 'rm'). : [#1] image.jpg split x remove[30%-70%] append x [#2] image.jpg split x remove[0-50%:2] append x remove_duplicates: . : [#1] (1,2,3,4,2,4,3,1,3,4,2,1) split x remove_duplicates append x remove_empty: . rmn: 'remove_named'. remove_named: "name1","name2",... . . ( 'rmn'). rv (+): 'reverse'. reverse (+): . ( 'rv'). : [#1] image.jpg split x,3 reverse[-2,-1] [#2] image.jpg split x,-16 reverse[50%-100%] append x sort_list: _ordering={ +:Increasing | -:Decreasing },_criterion . : 'ordering=+' 'criterion=i'. : [#1] (1;4;7;3;9;2;4;7;6;3;9;1;0;3;3;2) split y sort_list +,i append y 11.4. (Mathematical Operators) -------------------------------------------- abs (+): . : [#1] image.jpg +sub {ia} abs[-1] [#2] 300,1,1,1,'cos(20*x/w)' +abs display_graph 400,300 abscut (+): min,_max,_offset . 'i' 'cut(abs(i) + offset,min,max)*sign(i)' . / . : 'max=inf' 'offset=0'. : [#1] 300,1,1,1,'cos(20*x/w)' +abscut 0,0.5 append c display_graph 400,300 acos (+): . : [#1] image.jpg +normalize -1,1 acos[-1] [#2] 300,1,1,1,'cut(x/w+0.1*u,0,1)' +acos display_graph 400,300 : https://gmic.eu/oldtutorial/trigonometric-and- inverse-trigonometric-commands acosh (+): . + (+): 'add'. add (+): value[%] | [image] | 'formula' | ( ) . ( '+'). : [#1] image.jpg +add 30% cut 0,255 [#2] image.jpg +blur 5 normalize 0,255 add[1] [0] [#3] image.jpg add '80*cos(80*(x/w-0.5)*(y/w-0.5)+c)' cut 0,255 [#4] image.jpg repeat 9 { +rotate[0] {$>*36},1,0,50%,50% } add div 10 & (+): 'and'. and (+): value[%] | [image] | 'formula' | ( ) AND AND . ( '&'). : [#1] image.jpg and {128+64} [#2] image.jpg +mirror x and argmax: (argmax) . . : [#1] image.jpg sample lena,lion,square +argmax argmaxabs: argmaxabs . (maxabs) . argmin: (argmin) . . : [#1] image.jpg sample lena,lion,square +argmin argminabs: argminabs . (minabs) . asin (+): . : [#1] image.jpg +normalize -1,1 asin[-1] [#2] 300,1,1,1,'cut(x/w+0.1*u,0,1)' +asin display_graph 400,300 : https://gmic.eu/oldtutorial/trigonometric-and- inverse-trigonometric-commands asinh (+): . atan (+): . : [#1] image.jpg +normalize 0,8 atan[-1] [#2] 300,1,1,1,'4*x/w+u' +atan display_graph 400,300 : https://gmic.eu/oldtutorial/trigonometric-and- inverse-trigonometric-commands atan2 (+): [x_argument] . y x . : [#1] (-1,1) (-1;1) resize 400,400,1,1,3 atan2[1] [0] keep[1] mod {pi/8} : https://gmic.eu/oldtutorial/trigonometric-and- inverse-trigonometric-commands atanh (+): . << (+): 'bsl'. bsl (+): value[%] | [image] | 'formula' | ( ) . ( '<<'). : [#1] image.jpg bsl 'round(3*x/w,0)' cut 0,255 >> (+): 'bsr'. bsr (+): value[%] | [image] | 'formula' | ( ) . ( '>>'). : [#1] image.jpg bsr 'round(3*x/w,0)' cut 0,255 cos (+): . : [#1] image.jpg +normalize 0,{2*pi} cos[-1] [#2] 300,1,1,1,'20*x/w+u' +cos display_graph 400,300 : https://gmic.eu/oldtutorial/trigonometric-and- inverse-trigonometric-commands cosh (+): . : [#1] image.jpg +normalize -3,3 cosh[-1] [#2] 300,1,1,1,'4*x/w+u' +cosh display_graph 400,300 c (+): 'cut'. cut (+): { value0[%] | [image0] },{ value1[%] | [image1] } | [image] . ( 'c'). : [#1] image.jpg +add 30% cut[-1] 0,255 [#2] image.jpg +cut 25%,75% deg2rad: ( 'i*pi/180'). / (+): 'div'. div (+): value[%] | [image] | 'formula' | ( ) . ( '/'). : [#1] image.jpg div '1+abs(cos(x/10)*sin(y/10))' [#2] image.jpg +norm add[-1] 1 +div == (+): 'eq'. eq (+): value[%] | [image] | 'formula' | ( ) . ( '==').: [#1] image.jpg round 40 eq {round(ia,40)} [#2] image.jpg +mirror x eq erf (+): . : [#1] image.jpg +normalize 0,2 erf[-1] [#2] 300,1,1,1,'7*x/w-3.5+u' +erf display_graph 400,300 exp (+): . : [#1] image.jpg +normalize 0,2 exp[-1] [#2] 300,1,1,1,'7*x/w+u' +exp display_graph 400,300 >= (+): 'ge'. ge (+): value[%] | [image] | 'formula' | ( ) ' ' ' ' . ( '>='). : [#1] image.jpg ge {ia} [#2] image.jpg +mirror x ge > (+): 'gt'. gt (+): value[%] | [image] | 'formula' | ( ) ' ' ' ' . ( '>'). : [#1] image.jpg gt {ia} [#2] image.jpg +mirror x gt inrange: min[%],max[%],_include_min_boundary={ 0:No | 1:Yes },_include_max_boundary={ 0:No | 1:Yes } '[min,max]' . ( 'ir'). : 'include_min_boundary=include_max_boundary=1'. : [#1] image.jpg +inrange 25%,75% isinf: 'inf' . isnan: 'nan' . <= (+): 'le'. le (+): value[%] | [image] | 'formula' | ( ) ' ' ' ' . ( '<='). : [#1] image.jpg le {ia} [#2] image.jpg +mirror x le < (+): 'lt'. lt (+): value[%] | [image] | 'formula' | ( ) ' ' ' ' . ( '<'). : [#1] image.jpg lt {ia} [#2] image.jpg +mirror x lt log (+): e . : [#1] image.jpg +add 1 log[-1] [#2] 300,1,1,1,'7*x/w+u' +log display_graph 400,300 log10 (+): . : [#1] image.jpg +add 1 log10[-1] [#2] 300,1,1,1,'7*x/w+u' +log10 display_graph 400,300 log2 (+): . : [#1] image.jpg +add 1 log2[-1] [#2] 300,1,1,1,'7*x/w+u' +log2 display_graph 400,300 max (+): value[%] | [image] | 'formula' | ( ) . : [#1] image.jpg +mirror x max [#2] image.jpg max 'R=((x/w-0.5)^2+(y/h-0.5)^2)^0.5;255*R' maxabs (+): value[%] | [image] | 'formula' | ( ) maxabs maxabs . m/ (+): 'mdiv'. mdiv (+): value[%] | [image] | 'formula' | ( ) / . ( 'm/'). med: . : [#1] image.jpg sample lena,lion,square +med min (+): value[%] | [image] | 'formula' | ( ) . : [#1] image.jpg +mirror x min [#2] image.jpg min 'R=((x/w-0.5)^2+(y/h-0.5)^2)^0.5;255*R' minabs (+): value[%] | [image] | 'formula' | ( ) minabs minabs . % (+): 'mod'. mod (+): value[%] | [image] | 'formula' | ( ) (modulo) . ( '%'). : [#1] image.jpg +mirror x n. 1,255 round. mod [#2] image.jpg mod 'R=((x/w-0.5)^2+(y/h-0.5)^2)^0.5;255*R' m* (+): 'mmul'. mmul (+): value[%] | [image] | 'formula' | ( ) / . . ( 'm*'). : [#1] (0,1,0;0,0,1;1,0,0) (1;2;3) +mmul [#2] (0,1,0;0,0,1;1,0,0) image.jpg +mmul * (+): 'mul'. mul (+): value[%] | [image] | 'formula' | ( ) . ( '*'). : add sub div. : [#1] image.jpg +mul 2 cut 0,255 [#2] image.jpg (1,2,3,4,5,6,7,8) ri[-1] [0] mul[0] [-1] [#3] image.jpg mul '1-3*abs(x/w-0.5)' cut 0,255 [#4] image.jpg +luminance negate[-1] +mul!= (+): 'neq'. neq (+): value[%] | [image] | 'formula' | (no arg) . ( '!='). : [#1] image.jpg round 40 neq {round(ia,40)} oneminus: (one minus image) . : [#1] image.jpg normalize 0,1 +oneminus | (+): 'or'. or (+): value[%] | [image] | 'formula' | (no arg) OR OR . ( '|'). : [#1] image.jpg or 128 [#2] image.jpg +mirror x or ^ (+): 'pow'. pow (+): value[%] | [image] | 'formula' | (no arg) . ( '^'). : [#1] image.jpg div 255 +pow 0.5 mul 255 [#2] image.jpg gradient pow 2 add pow 0.2 rad2deg: ( 'i*180/pi'). rol (+): value[%] | [image] | 'formula' | (no arg) . : [#1] image.jpg rol 'round(3*x/w,0)' cut 0,255 ror (+): value[%] | [image] | 'formula' | (no arg) . : [#1] image.jpg ror 'round(3*x/w,0)' cut 0,255 sign (+): . : [#1] image.jpg +sub {ia} sign[-1] [#2] 300,1,1,1,'cos(20*x/w+u)' +sign display_graph 400,300 sin (+): . : [#1] image.jpg +normalize 0,{2*pi} sin[-1] [#2] 300,1,1,1,'20*x/w+u' +sin display_graph 400,300 : https://gmic.eu/oldtutorial/trigonometric-and- inverse-trigonometric-commands sinc (+): sinc . : [#1] image.jpg +normalize {-2*pi},{2*pi} sinc[-1] [#2] 300,1,1,1,'20*x/w+u' +sinc display_graph 400,300 sinh (+): . : [#1] image.jpg +normalize -3,3 sinh[-1] [#2] 300,1,1,1,'4*x/w+u' +sinh display_graph 400,300 softmax: _temperature>0 softmax . : 'temperature=1'. : [#1] 100,1,1,1,"x0 softmin . : 'temperature=1'. : [#1] 100,1,1,1,"x () . : [#1] image.jpg +sqr [#2] 300,1,1,1,'40*x/w+u' +sqr display_graph 400,300 sqrt (+): . : [#1] image.jpg +sqrt [#2] 300,1,1,1,'40*x/w+u' +sqrt display_graph 400,300 - (+): 'sub'. sub (+): value[%] | [image] | 'formula' | (no arg) . ( '-'). : [#1] image.jpg +sub 30% cut 0,255 [#2] image.jpg +mirror x sub[-1] [0] [#3] image.jpg sub 'i(w/2+0.9*(x-w/2),y)' [#4] image.jpg +mirror x sub tan (+): . : [#1] image.jpg +normalize {-0.47*pi},{0.47*pi} tan[-1] [#2] 300,1,1,1,'20*x/w+u' +tan display_graph 400,300 : https://gmic.eu/oldtutorial/trigonometric-and- inverse-trigonometric-commands tanh (+): . : [#1] image.jpg +normalize -3,3 tanh[-1] [#2] 300,1,1,1,'4*x/w+u' +tanh display_graph 400,300 xor (+): value[%] | [image] | 'formula' | (no arg) XOR XOR . : [#1] image.jpg xor 128 [#2] image.jpg +mirror x xor 11.5. (Values Manipulation) --------------------------------------- apply_curve: 0<=smoothness<=1,x0,y0,x1,y1,x2,y2,...,xN,yN . : 'smoothness=1', 'x0=0', 'y0=100'. : [#1] image.jpg +apply_curve 1,0,0,128,255,255,0 apply_gamma: gamma>=0 . : [#1] image.jpg +apply_gamma 2 apply_mask: "command",[opacity_mask],_max_opacity_mask . : 'max_opacity_mask=1'. : [#1] image.jpg 100%,100% noise. 10 blur. 2%,0 ge. 50% blur. 0.5% normalize. 0,1 +apply_mask.. "sepia whirls",[-1] balance_gamma: _ref_color1,... . : 'ref_color1=128'. : [#1] image.jpg +balance_gamma 128,64,64 cast: datatype_source,datatype_target . 'datatype_source' 'datatype_target' { uint8 | int8 | uint16 | int16 | uint32 | int32 | uint64 | int64 | float32 | float64 } .complex2polar: . : [#1] image.jpg +fft complex2polar[-2,-1] log[-2] shift[-2] 50%,50%,0,0,2 remove[-1] compress_clut: LUT . compress_huffman: [huffman_tree],_max_leaf_value (Huffman). : decompress_huffman huffman_tree. compress_rle: _is_binary_data={ 0:No | 1:Yes },_maximum_sequence_length>=0 2xN RLE. 'maximum_sequence_length=0' . : 'is_binary_data=0' 'maximum_sequence_length=0'. : [#1] image.jpg rescale2d ,100 quantize 4 round +compress_rle , +decompress_rle[-1] cumulate (+): { x | y | z | c }...{ x | y | z | c } | ( ) . : [#1] image.jpg +histogram 256 +cumulate[-1] display_graph[-2,-1] 400,300,3 decompress_clut: _width>0,_height>0,_depth>0 CLUT RBF/PDE. : 'width=height=depth=33' 'reconstruction_colorspace=0'. decompress_from_keypoints: _width>0,_height>0,_depth>0 | ( ) ( ). : * '[ Width,Height,Depth ]' . * '[ Min,Max,Use_RBF ]' 'Min' 'Max' 'Use_RBF' RBF ('Use_RBF=1') PDE ('Use_RBF=0'). * : - '[ x_k,y_k,z_k, v1_k,...,vN_k ]' N-. - '[ x_k,y_k, v1_k,...,vN_k ]' N-. - '[ x_k, v1_k,...,vN_k ]' N-. 'x_k' 'y_k' 'z_k' '[0,Width-1]' '[0,Height-1]' '[0,Depth-1]' . 'width' 'height' 'depth' '[ Width,Height,Depth ]' . decompress_huffman: [huffman_tree] (Huffman). : compress_huffman huffman_tree. : [#1] image.jpg huffman_tree compress_huffman.. . +decompress_huffman.. . decompress_rle: RLE. discard (+): _value1,_value2,... | { x | y | z | c}...{ x | y | z | c},_value1,_value2,... | ( ) . . . : [#1] (1;2;3;4;3;2;1) +discard 2 [#2] (1,2,2,3,3,3,4,4,4,4) +discard x eigen2tensor: / 2x2 3x3. Tutorial: https://gmic.eu/tutorial/eigen2tensor endian (+): _datatype (endianness) . 'datatype' { bool | uint8 | int8 | uint16 | int16 | uint32 | int32 | uint64 | int64 | float32 | float64 } . 'bool' 'uint8' 'int8' . equalize (+): _nb_levels[%]>0,_value_min[%],_value_max[%] | ( ) . . : 'nb_levels=256' 'value_min=0%' 'value_max=100%'. : [#1] image.jpg +equalize [#2] image.jpg +equalize 4,0,128 f (+): 'fill'. fill (+): value1,_value2,... | [image] | 'formula' . 'formula' . ( 'f'). : [#1] 4,4 fill 1,2,3,4,5,6,7 [#2] 4,4 (1,2,3,4,5,6,7) fill[-2] [-1] [#3] 400,400,1,3 fill "X=x-w/2; Y=y-h/2; R=sqrt(X^2+Y^2); a=atan2(Y,X); R<=180?255*abs(cos(c+200*(x/w-0.5)*(y/h-0.5))):850*(a%(0.1*(c+1)))" : https://gmic.eu/tutorial/fill icp: [reference],_affine_mode,_precision>0,_iter_max>=0 () ICP (Iterative Closest Point). ICP https://en.wikipedia.org/wiki/Iterative_closest_point . 'affine_mode' . : { 0:Free | 1:Rotation+Scaling | 2:Rotation-Only }. : 'affine_mode=0' 'precision=1e-3' 'iter_max=1000'. index (+): { [palette] | palette_name },0<=_dithering<=1,_map_colors={ 0:No | 1:Yes } . 'palette_name' { default | hsv | lines | hot | cool | jet | flag | cube | rainbow | algae | amp |balance | curl | deep | delta | dense | diff | haline | ice | matter | oxy | phase | rain | solar | speed | tarn |tempo | thermal | topo | turbid | aurora | hocuspocus | srb2 | uzebox } . : 'dithering=0' 'map_colors=0'. : [#1] image.jpg +index 1,1,1 [#2] image.jpg (0;255;255^0;128;255^0;0;255) +index[-2] [-1],1,1 : https://gmic.eu/tutorial/gindex ir: 'inrange'. map (+): [palette],_boundary_conditions | palette_name,_boundary_conditions . 'M*N' 'M' 'N' 'palette' . 'palette_name' { default | hsv | lines | hot | cool | jet | flag | cube | rainbow | algae | amp | balance | curl | deep | delta | dense | diff | gray | haline | ice | matter | oxy | phase | rain | random | solar | speed | tarn | tempo | thermal | topo | turbid | aurora | hocuspocus | srb2 | uzebox } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=0'. : [#1] image.jpg +luminance map[-1] 3 [#2] image.jpg +rgb2ycbcr split[-1] c (0,255,0) resize[-1] 256,1,1,1,3 map[-4] [-1] remove[-1] append[-3--1] c ycbcr2rgb[-1] : https://gmic.eu/tutorial/map mix_channels: (a00,...,aMN) | [matrix] . : [#1] image.jpg +mix_channels (0,1,0;1,0,0;0,0,1) negate: base_value | ( ) () . : 'base_value=(undefined)'. : [#1] image.jpg +negate noise (+): amplitude[%]>=0,_noise_type . 'noise_type' { 0:Gaussian | 1:Uniform | 2:Salt&pepper | 3:Poisson | 4:Rice } . : 'noise_type=0'. : [#1] image.jpg +noise[0] 50,0 +noise[0] 50,1 +noise[0] 10,2 cut 0,255 [#2] 300,300,1,3 [0] noise[0] 20,0 noise[1] 20,1 +histogram 100 display_graph[-2,-1] 400,300,3 noise_hurl: _amplitude>=0 (hurl) . : 'amplitude=10'. : [#1] image.jpg +noise_hurl , noise_perlin: _scale_x[%]>0,_scale_y[%]>0,_scale_z[%]>0,_seed_x,_seed_y,_seed_z (Perlin noise) . : https://en.wikipedia.org/wiki/Perlin_noise. : 'scale_x=scale_y=scale_z=16' 'seed_x=seed_y=seed_z=0'. : [#1] 500,500,1,3 noise_perlin , noise_poissondisk: _radius[%]>0,_max_sample_attempts>0,_p_norm>0 (poisson disk sampling) . <> Robert Bridson SIGGRAPH'2007. : 'radius=8' 'max_sample_attempts=30' 'p_norm=2'. : [#1] 300,300 noise_poissondisk 8normp: p>=0 Lp . : 'p=2'. : [#1] image.jpg +normp[0] 0 +normp[0] 1 +normp[0] 2 +normp[0] inf norm1: L1 . : [#1] image.jpg +norm1 : https://gmic.eu/tutorial/norm1 norm: 'norm2'. norm2: L2 ( ) . : [#1] image.jpg +norm : https://gmic.eu/tutorial/norm2 n (+): 'normalize'. normalize (+): { value0[%] | [image0] },{ value1[%] | [image1] },_constant_case_ratio | [image] . ( 'n'). : [#1] image.jpg split x,2 normalize[-1] 64,196 append x : https://gmic.eu/tutorial/normalize normalize_l2: L2 . normalize_sum: . : [#1] image.jpg +histogram 256 normalize_sum[-1] display_graph[-1] 400,300 orientation: . : [#1] image.jpg +orientation +norm[-2] negate[-1] mul[-2] [-1] reverse[-2,-1] : https://gmic.eu/tutorial/orientation otsu: _nb_levels>0 Otsu . (status) . : 'nb_levels=256'. : [#1] image.jpg luminance +otsu , polar2complex: . quantize: nb_levels>=1,_keep_values={ 0:No | 1:Yes },_quantization_type={ -1:Median-cut | 0:K-means | 1:Uniform } . : 'keep_values=1' 'quantization_type=0'. : [#1] image.jpg luminance +quantize 3 [#2] 200,200,1,1,'cos(x/10)*sin(y/10)' +quantize[0] 6 +quantize[0] 4 +quantize[0] 3 +quantize[0] 2 quantize_area: _min_area>0 'min_area' . : 'min_area=10'. : [#1] image.jpg quantize 3 +blur 1 round[-1] +quantize_area[-1] 2 rand (+): { value0[%] | [image0] },_{ value1[%] | [image1] },_[pdf],_precision[%] | [image] . '[pdf]' ( ) . 'precision' '[pdf]' . : [#1] 400,400,1,3 rand -10,10 +blur 10 sign[-1] [#2] (8,2,1) 50,50 rand[-1] 0,255,[-2] [#3] 256 gaussian[-1] 30 line[-1] 47%,0,53%,0,1,0 500,500 rand[-1] 0,255,[-2] +histogram[-1] 256 display_graph[0,2] 640,480,3,0 rand_sum: sum>0,_random_function 'sum' . 'sum' 'width*height*depth*spectrum' . : 'random_function=u'. : [#1] 100 rand_sum 1000 replace: source,target . : [#1] (1;2;3;4) +replace 2,3 replace_inf: _expression . : [#1] (0;1;2) log +replace_inf 2 replace_infnan: _expression NaN . replace_nan: _expression NaN . : [#1] (-1;0;2) sqrt +replace_nan 2 replace_seq: "search_seq","replace_seq" . : [#1] (1;2;3;4;5) +replace_seq "2,3,4","7,8" replace_str: "search_str","replace_str" ( ). : [#1] ('"Hello there, how are you ?"') +replace_str "Hello there","Hi David" round (+): rounding_value>=0,_rounding_type | (no arg) . 'rounding_type' { -1:Backward | 0:Nearest | 1:Forward } . : 'rounding_type=0'. : [#1] image.jpg +round 100 [#2] image.jpg mul {pi/180} sin +round roundify: gamma>=0 (roundify) . : 'gamma=0'. : [#1] 1000 fill '4*x/w' repeat 5 { +roundify[0] {$>*0.2} } append c display_graph 400,300 = (+): 'set'. set (+): value,_x[%],_y[%],_z[%],_c[%] . ( '='). . : 'x=y=z=c=0'. : [#1] 2,2 set 1,0,0 set 2,1,0 set 3,0,1 set 4,1,1 [#2] image.jpg repeat 10000 { set 255,{u(100)}%,{u(100)}%,0,{u(100)}% } threshold: value[%],_is_soft_thresholding={ 0:No | 1:Yes } . 'soft' { 0:Hard-thresholding | 1:Soft- thresholding } . : 'is_soft=0'. : [#1] image.jpg +threshold[0] 50% +threshold[0] 50%,1 : https://gmic.eu/tutorial/threshold unitnorm: _p>=0 Lp . : 'p=2'. : [#1] image.jpg +unitnorm 2 vector2tensor: . 11.6. (Colors) ------ adjust_colors: -100<=_brightness<=100,-100<=_contrast<=100,-100<=_gamma<=100,-100<=_hue_shift<=100,-100<=_saturation<=100,_value_min,_value_max . [value_min,value_max] ( [0,255]). 'value_min==value_max==0' / . [value_min,value_max] . : 'brightness=0', 'contrast=0', 'gamma=0', 'hue_shift=0', 'saturation=0', 'value_min=value_max=0'.: [#1] image.jpg +adjust_colors 0,30,0,0,30 ac: 'apply_channels'. apply_channels: "command",color_channels,_value_action={ 0:None | 1:Cut | 2:Normalize } () . ( 'ac'). 'color_channels' { all | rgba | [s]rgb | ryb | lrgb | ycbcr | lab | lch | hsv | hsi | hsl | cmy | cmyk | yiq } . 'color_channels' 'colorspace_channel' ( 'hsv_h' ) . [0,255] . : 'value_action=0'. : [#1] image.jpg +apply_channels "equalize blur 2",ycbcr_cbcr autoindex: nb_colors>0,0<=_dithering<=1,_method={ 0:Median-cut | 1:K-means } . : 'dithering=0' 'method=1'. : [#1] image.jpg +autoindex[0] 4 +autoindex[0] 8 +autoindex[0] 16 bayer2rgb: _GM_smoothness,_RB_smoothness1,_RB_smoothness2 RGB-Bayer . : 'GM_smoothness=RB_smoothness=1' 'RB_smoothness2=0.5'. : [#1] image.jpg rgb2bayer 0 +bayer2rgb 1,1,0.5 brightness: strength . * 'strength' . * 'strength' . 'strength' [-100,100] . : [#1] image.jpg +brightness 20 clut: "clut_name",_resolution>0,_cut_and_round={ 0:No | 1:Yes } 1189 CLUT . 'clut_name' { 12_years_a_slave | 1917 | 2-strip-process | 400_ft | 60s | 60s_faded | 60s_faded_alt | 7drk_21 | action_magenta_01 | action_red_01 | ad_astra | adventure_1453 | aerospace | agfa_apx_100 | agfa_apx_25 | agfa_precisa_100 | agfa_ultra_color_100 | agfa_vista_200 | agressive_highligjtes_recovery_5 | airdrop | aladdin | alberto_street | alien_green | ampio | amstragram | amstragram+ | analog_film_1 | analogfx_anno_1870_color | analogfx_old_style_i | analogfx_old_style_ii | analogfx_old_style_iii | analogfx_sepia_color | analogfx_soft_sepia_i | analogfx_soft_sepia_ii | anime | ant-man | apocalypse_this_very_moment | aqua | aqua_and_orange_dark | aquaman | arabica_12 | asistas | atomic_pink | atusa | autumn | autumn_leaves | ava_614 | avalanche | avengers_endgame | azrael_93 | baby_driver | bad_boys_for_life | basuco | bboyz_2 | bc_darkum | beach_aqua_orange | beach_faded_analog | beati | beauty_and_the_beast | berlin_sky | bisogno | black_and_white | black_panther | black_star | black_white_01 | black_white_02 | black_white_03 | black_white_04 | black_white_05 | black_white_06 | blade_runner | bleach_bypass | bleachbypass_1 | bleachbypass_2 | bleachbypass_3 | bleachbypass_4 | bleech_bypass_green | bleech_bypass_yellow_01 | blue_cold_fade | blue_dark | blue_house | blue_ice | blue_love_39 | blue_mono | blue_shadows_01 | bluearchitecture | bluehour | blues | bob_ford | bohemian_rhapsody | bombshell | bourbon_64 | boyado | bright_green_01 | bright_teal_orange | bright_warm | brightgreen | brown_mobster | brownbm | brownish | bw_1 | bw_10 | bw_2 | bw_3 | bw_4 | bw_5 | bw_6 | bw_7 | bw_8 | bw_9 | bw_but_yellow | byers_11 | calidum | candlelight | captain_marvel | caribe | chemical_168 | chrome_01 | cine-1 | cine-10 | cine-11 | cine-12 | cine-13 | cine-14 | cine-15 | cine-16 | cine-17 | cine-18 | cine-19 | cine-2 | cine-20 | cine-21 | cine-22 | cine-23 | cine-24 | cine-25 | cine-26 | cine-27 | cine-28 | cine-29 | cine-3 | cine-30 | cine-4 | cine-5 | cine-6 | cine-7 | cine-8 | cine-9 | cineblue | cinebm_4k | cinema | cinema_2 | cinema_3 | cinema_4 | cinema_5 | cinema_noir | cinematic-1 | cinematic-10 | cinematic-2 | cinematic-3 | cinematic-4 | cinematic-5 | cinematic-6 | cinematic-7 | cinematic-8 | cinematic-9 | cinematic_01 | cinematic_02 | cinematic_03 | cinematic_04 | cinematic_05 | cinematic_06 | cinematic_07 | cinematic_for_flog | cinematic_forest | cinematic_lady_bird | cinematic_mexico | city | city_7 | city_dust | city_of_god | classic_films_01 | classic_films_02 | classic_films_03 | classic_films_04 | classic_films_05 | classic_teal_and_orange | clayton_33 | clear | clear_teal_fade | clouseau_54 | cobi_3 | coffee_44 | cold_clear_blue | cold_clear_blue_1 | cold_ice | cold_simplicity_2 | coldchrome | color_rich | colore | colorful_0209 | colornegative | conflict_01 | contrail_35 | contrast_with_highlights_protection | contrasty_afternoon | contrasty_green | convold | cosa | creed_2 | crispautumn | crispromance | crispwarm | crispwinter | cross_process_cp_130 | cross_process_cp_14 | cross_process_cp_15 | cross_process_cp_16 | cross_process_cp_18 | cross_process_cp_3 | cross_process_cp_4 | cross_process_cp_6 | crushin | cubicle_99 | culor | d_o_1 | dark_blues_in_sunlight | dark_green_02 | dark_green_1 | dark_man_x | dark_orange_teal | dark_place_01 | darkandsomber | darkness | date_39 | day_4nite | day_for_night | day_to_night_kings_blue | deep | deep_blue | deep_dark_warm | deep_high_contrast | deep_teal_fade | deep_warm_fade | deepskintones_2 | deepskintones_3 | delicatessen | denoiser_simple_40 | desert_gold_37 | dimension | dimmer | directions_23 | django_25 | doctor_strange | domingo_145 | dream_1 | dream_85 | drop_green_tint_14 | dropblues | dunkirk | duotone_blue_red | earth_tone_boost | eda_0_2 | edgyember | elegance_38 | enchanted | ensaya | eterna_for_flog | expired_69 | expired_fade | expired_polaroid | extreme | fade | fade_to_green | faded | faded_47 | faded_alt | faded_analog | faded_extreme | faded_green | faded_pink-ish | faded_print | faded_retro_01 | faded_retro_02 | faded_vivid | fadedlook | fallcolors | falua | farkling | fatos | faux_infrared | faux_infrared_bw_1 | faux_infrared_color_p_2 | faux_infrared_color_p_3 | faux_infrared_color_r_0a | faux_infrared_color_r_0b | faux_infrared_color_yp_1 | fezzle | fg_cinebasic | fg_cinebright | fg_cinecold | fg_cinedrama | fg_cinetealorange_1 | fg_cinetealorange_2 | fg_cinevibrant | fg_cinewarm | fgcinebasic | fgcinebright | fgcinecold | fgcinedrama | fgcinetealorange_1 | fgcinetealorange_2 | fgcinevibrant | fgcinewarm | fight_club | film_0987 | film_9879 | film_gb-19 | film_high_contrast | film_print_01 | film_print_02 | filmic | filo | flat_30 | flat_blue_moon | flavin | flog_to_rec_709 | foggynight | folger_50 | ford_v_ferrari | foresta | formula_b | french_comedy | frosted | frostedbeachpicnic | fuji_160c | fuji_160c_+ | fuji_160c_++ | fuji_160c_- | fuji_3510_constlclip | fuji_3510_constlmap | fuji_3510_cuspclip | fuji_3513_constlclip | fuji_3513_constlmap | fuji_3513_cuspclip | fuji_400h | fuji_400h_+ | fuji_400h_++ | fuji_400h_- | fuji_800z | fuji_800z_+ | fuji_800z_++ | fuji_800z_- | fuji_astia_100_generic | fuji_astia_100f | fuji_fp-100c | fuji_fp-100c_+ | fuji_fp-100c_++ | fuji_fp-100c_+++ | fuji_fp-100c_++_alt | fuji_fp-100c_- | fuji_fp-100c_-- | fuji_fp-100c_alt | fuji_fp-100c_cool | fuji_fp-100c_cool_+ | fuji_fp-100c_cool_++ | fuji_fp-100c_cool_- | fuji_fp-100c_cool_-- | fuji_fp-100c_negative | fuji_fp-100c_negative_+ | fuji_fp-100c_negative_++ | fuji_fp-100c_negative_+++ | fuji_fp-100c_negative_++_alt | fuji_fp-100c_negative_- | fuji_fp-100c_negative_-- | fuji_fp-3000b | fuji_fp-3000b_+ | fuji_fp-3000b_++ | fuji_fp-3000b_+++ | fuji_fp-3000b_- | fuji_fp-3000b_-- | fuji_fp-3000b_hc | fuji_fp-3000b_negative | fuji_fp-3000b_negative_+ | fuji_fp-3000b_negative_++ | fuji_fp-3000b_negative_+++ | fuji_fp-3000b_negative_- | fuji_fp-3000b_negative_-- | fuji_fp-3000b_negative_early | fuji_fp_100c | fuji_hdr | fuji_neopan_1600 | fuji_neopan_1600_+ | fuji_neopan_1600_++ | fuji_neopan_1600_- | fuji_neopan_acros_100 | fuji_provia_100_generic | fuji_provia_100f | fuji_provia_400f | fuji_provia_400x | fuji_sensia_100 | fuji_superia_100 | fuji_superia_100_+ | fuji_superia_100_++ | fuji_superia_100_- | fuji_superia_1600 | fuji_superia_1600_+ | fuji_superia_1600_++ | fuji_superia_1600_- | fuji_superia_200 | fuji_superia_200_xpro | fuji_superia_400 | fuji_superia_400_+ | fuji_superia_400_++ | fuji_superia_400_- | fuji_superia_800 | fuji_superia_800_+ | fuji_superia_800_++ | fuji_superia_800_- | fuji_superia_hg_1600 | fuji_superia_reala_100 | fuji_superia_x-tra_800 | fuji_velvia_100_generic | fuji_velvia_50 | fuji_xtrans_iii_acros | fuji_xtrans_iii_acros+g | fuji_xtrans_iii_acros+r | fuji_xtrans_iii_acros+ye | fuji_xtrans_iii_astia | fuji_xtrans_iii_classic_chrome | fuji_xtrans_iii_mono | fuji_xtrans_iii_mono+g | fuji_xtrans_iii_mono+r | fuji_xtrans_iii_mono+ye | fuji_xtrans_iii_pro_neg_hi | fuji_xtrans_iii_pro_neg_std | fuji_xtrans_iii_provia | fuji_xtrans_iii_sepia | fuji_xtrans_iii_velvia | fusion_88 | futuristicbleak_1 | futuristicbleak_2 | futuristicbleak_3 | futuristicbleak_4 | going_for_a_walk | golden | golden_bright | golden_fade | golden_mono | golden_night_softner_43 | golden_sony_37 | golden_vibrant | goldengate | goldentime | goldfx_bright_spring_breeze | goldfx_bright_summer_heat | goldfx_hot_summer_heat | goldfx_perfect_sunset_01min | goldfx_perfect_sunset_05min | goldfx_perfect_sunset_10min | goldfx_spring_breeze | goldfx_summer_heat | good_morning | green_15 | green_2025 | green_action | green_afternoon | green_and_orange | green_blues | green_book | green_conflict | green_day_01 | green_day_02 | green_g_09 | green_indoor | green_light | green_mono | green_yellow | greenish_contrasty | greenish_fade | greenish_fade_1 | gremerta | greyhound | hackmanite | hallowen_dark | happyness_133 | hard_teal_orange | hardboost | harsh_day | harsh_sunset | helios | herderite | heulandite | hiddenite | highlights_protection | hilutite | hitman | hlg_1_1 | honey_light | hong_kong | horrorblue | howlite | huesio | husmes | huyan | hydracore | hyla_68 | hypersthene | hypnosis | hypressen | i_tonya | ideo | ilford_delta_100 | ilford_delta_3200 | ilford_delta_3200_+ | ilford_delta_3200_++ | ilford_delta_3200_- | ilford_delta_400 | ilford_fp_4_plus_125 | ilford_hp_5 | ilford_hp_5_+ | ilford_hp_5_++ | ilford_hp_5_- | ilford_hp_5_plus_400 | ilford_hps_800 | ilford_pan_f_plus_50 | ilford_xp_2 | inception | indoor_blue | industrial_33 | infrared_-_dust_pink | instantc | j | jarklin | jojo_rabbit | joker | jumanji_the_next_level | jurassic_world_fallen_kingdom | justice_league | justpeachy | jwick_21 | k_tone_vintage_kodachrome | kahve_3 | kh_1 | kh_10 | kh_2 | kh_3 | kh_4 | kh_5 | kh_6 | kh_7 | kh_8 | kh_9 | killstreak | kingsman_the_golden_circle | knives_out | kodak_2383_constlclip | kodak_2383_constlmap | kodak_2383_cuspclip | kodak_2393_constlclip | kodak_2393_constlmap | kodak_2393_cuspclip | kodak_bw_400_cn | kodak_e-100_gx_ektachrome_100 | kodak_ektachrome_100_vs | kodak_ektachrome_100_vs_generic | kodak_ektar_100 | kodak_elite_100_xpro | kodak_elite_chrome_200 | kodak_elite_chrome_400 | kodak_elite_color_200 | kodak_elite_color_400 | kodak_elite_extracolor_100 | kodak_hie_hs_infra | kodak_kodachrome_200 | kodak_kodachrome_25 | kodak_kodachrome_64 | kodak_kodachrome_64_generic | kodak_portra_160 | kodak_portra_160_+ | kodak_portra_160_++ | kodak_portra_160_- | kodak_portra_160_nc | kodak_portra_160_nc_+ | kodak_portra_160_nc_++ | kodak_portra_160_nc_- | kodak_portra_160_vc | kodak_portra_160_vc_+ | kodak_portra_160_vc_++ | kodak_portra_160_vc_- | kodak_portra_400 | kodak_portra_400_+ | kodak_portra_400_++ | kodak_portra_400_- | kodak_portra_400_nc | kodak_portra_400_nc_+ | kodak_portra_400_nc_++ | kodak_portra_400_nc_- | kodak_portra_400_uc | kodak_portra_400_uc_+ | kodak_portra_400_uc_++ | kodak_portra_400_uc_- | kodak_portra_400_vc | kodak_portra_400_vc_+ | kodak_portra_400_vc_++ | kodak_portra_400_vc_- | kodak_portra_800 | kodak_portra_800_+ | kodak_portra_800_++ | kodak_portra_800_- | kodak_portra_800_hc | kodak_t-max_100 | kodak_t-max_3200 | kodak_t- max_400 | kodak_tmax_3200 | kodak_tmax_3200_+ | kodak_tmax_3200_++ | kodak_tmax_3200_- | kodak_tmax_3200_alt | kodak_tri-x_400 | kodak_tri-x_400_+ | kodak_tri-x_400_++ | kodak_tri-x_400_- | kodak_tri- x_400_alt | korben_214 | la_la_land | landscape | landscape_01 | landscape_02 | landscape_03 | landscape_04 | landscape_05 | landscape_1 | landscape_10 | landscape_2 | landscape_3 | landscape_4 | landscape_5 | landscape_6 | landscape_7 | landscape_8 | landscape_9 | lateafternoonwanderlust | latesunset | lavark | lc_1 | lc_10 | lc_2 | lc_3 | lc_4 | lc_5 | lc_6 | lc_7 | lc_8 | lc_9 | lenox_340 | levex | life_giving_tree | light | light_blown | litore | little_women | logan | lomo | lomography_redscale_100 | lomography_x-pro_slide_200 | london_nights | longbeachmorning | loro | lotta | louetta | low_altitude | low_contrast_blue | low_key_01 | lucky_64 | lushgreen | lushgreensummer | mad_max_fury_road | maesky | magenta_day | magenta_day_01 | magenta_dream | magenta_yellow | magentacoffee | magichour | marriage_story | matrix | mckinnon_75 | memories | mercato | metropolis | milo_5 | minimalistcaffeination | modern_film | modern_films_01 | modern_films_02 | modern_films_03 | modern_films_04 | modern_films_05 | modern_films_06 | modern_films_07 | molti | mono_2 | mono_tinted | monochrome | monochrome_1 | monochrome_2 | moody_1 | moody_10 | moody_2 | moody_3 | moody_4 | moody_5 | moody_6 | moody_7 | moody_8 | moody_9 | moonlight | moonlight_01 | moonlight_2 | moonrise | morning_6 | morroco_16 | mostly_blue | mother! | motus | moviz_1 | moviz_10 | moviz_11 | moviz_12 | moviz_13 | moviz_14 | moviz_15 | moviz_16 | moviz_17 | moviz_18 | moviz_19 | moviz_2 | moviz_20 | moviz_21 | moviz_22 | moviz_23 | moviz_24 | moviz_25 | moviz_26 | moviz_27 | moviz_28 | moviz_29 | moviz_3 | moviz_30 | moviz_31 | moviz_32 | moviz_33 | moviz_34 | moviz_35 | moviz_36 | moviz_37 | moviz_38 | moviz_39 | moviz_4 | moviz_40 | moviz_41 | moviz_42 | moviz_43 | moviz_44 | moviz_45 | moviz_46 | moviz_47 | moviz_48 | moviz_5 | moviz_6 | moviz_7 | moviz_8 | moviz_9 | mucca | mute_shift | muted_01 | muted_fade | mysticpurplesunset | nah | natural_01 | natural_02 | natural_03 | natural_vivid | naturalboost | negative | nemesis | neon_770 | neutral | neutral_pump | neutral_teal_orange | neutral_warm_fade | newspaper | night_01 | night_02 | night_03 | night_04 | night_05 | night_blade_4 | night_king_141 | night_spy | night_view | nightfromday | nightlife | nigrum | no_time_to_die | nostalgiahoney | nostalgic | nw-1 | nw-10 | nw-2 | nw-3 | nw-4 | nw-5 | nw-6 | nw-7 | nw-8 | nw-9 | old_west | once_upon_a_time | once_upon_a_time_in_hollywood | onda | only_red | only_red_and_blue | operation_yellow | orange_dark_4 | orange_dark_7 | orange_dark_look | orange_tone | orange_underexposed | orangeandblue | oranges | padre | paladin | paladin_1875 | parasite | partia | pasadena_21 | passing_by | perso | picola | pink_fade | pirates_of_the_caribbean | pitaya_15 | pmcinematic_01 | pmcinematic_02 | pmcinematic_03 | pmcinematic_04 | pmcinematic_05 | pmcinematic_06 | pmcinematic_07 | pmnight_01 | pmnight_02 | pmnight_03 | pmnight_04 | pmnight_05 | polaroid_664 | polaroid_665 | polaroid_665_+ | polaroid_665_++ | polaroid_665_- | polaroid_665_-- | polaroid_665_negative | polaroid_665_negative_+ | polaroid_665_negative_- | polaroid_665_negative_hc | polaroid_667 | polaroid_669 | polaroid_669_+ | polaroid_669_++ | polaroid_669_+++ | polaroid_669_- | polaroid_669_-- | polaroid_669_cold | polaroid_669_cold_+ | polaroid_669_cold_- | polaroid_669_cold_-- | polaroid_672 | polaroid_690 | polaroid_690_+ | polaroid_690_++ | polaroid_690_- | polaroid_690_-- | polaroid_690_cold | polaroid_690_cold_+ | polaroid_690_cold_++ | polaroid_690_cold_- | polaroid_690_cold_-- | polaroid_690_warm | polaroid_690_warm_+ | polaroid_690_warm_++ | polaroid_690_warm_- | polaroid_690_warm_-- | polaroid_polachrome | polaroid_px-100uv+_cold | polaroid_px-100uv+_cold_+ | polaroid_px-100uv+_cold_++ | polaroid_px-100uv+_cold_+++ | polaroid_px-100uv+_cold_- | polaroid_px-100uv+_cold_-- | polaroid_px-100uv+_warm | polaroid_px-100uv+_warm_+ | polaroid_px-100uv+_warm_++ | polaroid_px-100uv+_warm_+++ | polaroid_px-100uv+_warm_- | polaroid_px-100uv+_warm_-- | polaroid_px-680 | polaroid_px-680_+ | polaroid_px-680_++ | polaroid_px-680_- | polaroid_px-680_-- | polaroid_px-680_cold | polaroid_px-680_cold_+ | polaroid_px-680_cold_++ | polaroid_px-680_cold_++_alt | polaroid_px-680_cold_- | polaroid_px-680_cold_-- | polaroid_px-680_warm | polaroid_px-680_warm_+ | polaroid_px-680_warm_++ | polaroid_px-680_warm_- | polaroid_px-680_warm_-- | polaroid_px-70 | polaroid_px-70_+ | polaroid_px-70_++ | polaroid_px-70_+++ | polaroid_px-70_- | polaroid_px-70_-- | polaroid_px-70_cold | polaroid_px-70_cold_+ | polaroid_px-70_cold_++ | polaroid_px-70_cold_- | polaroid_px-70_cold_-- | polaroid_px-70_warm | polaroid_px-70_warm_+ | polaroid_px-70_warm_++ | polaroid_px-70_warm_- | polaroid_px-70_warm_-- | polaroid_time_zero_expired | polaroid_time_zero_expired_+ | polaroid_time_zero_expired_++ | polaroid_time_zero_expired_- | polaroid_time_zero_expired_-- | polaroid_time_zero_expired_--- | polaroid_time_zero_expired_cold | polaroid_time_zero_expired_cold_- | polaroid_time_zero_expired_cold_-- | polaroid_time_zero_expired_cold_--- | portrait | portrait_1 | portrait_10 | portrait_2 | portrait_3 | portrait_4 | portrait_5 | portrait_6 | portrait_7 | portrait_8 | portrait_9 | progressen | protect_highlights_01 | prussian_blue | pseudogrey | purple | purple_2 | quraqqq_12 | radar | randas | red_afternoon_01 | red_day_01 | red_dream_01 | redblueyellow | reds | reds_oranges_yellows | reeve_38 | remy_24 | rest_33 | retro | retro_brown_01 | retro_magenta_01 | retro_summer_3 | retro_yellow_01 | rocketman | rollei_ir_400 | rollei_ortho_25 | rollei_retro_100_tonal | rollei_retro_80s | rotate_muted | rotate_vibrant | rotated | rotated_crush | satid | saturated_blue | saving_private_damon | scala | science_fiction | scrittle | sea | seges | selor | sensum | separation | serenity | seringe_4 | serpent | seventies_magazine | sevsuz | shade_kings_ink | shadow_king_39 | shine | sicario | sino | skin_tones | slog_to_rec_709_basic | slog_to_rec_709_contrasty | slog_to_rec_709_crush_shadows | slog_to_rec_709_green_correction | smart_contrast | smokey | smooth_clear | smooth_cromeish | smooth_fade | smooth_green_orange | smooth_sailing | smooth_teal_orange | soft_fade | softblackandwhite | softwarming | solarized_color | solarized_color_2 | soldi | spider-man_far_from_home | spotlight | springmorning | sprocket_231 | spy_29 | standard | star_wars_the_rise_of_skywalker | strano | street | stringa | studio_skin_tone_shaper | subtle_blue | subtle_green | subtle_yellow | sully | summer | summer_alt | sunlight_love_11 | sunlightlove | sunny | sunny_alt | sunny_rich | sunny_warm | sunset | sunset_aqua_orange | sunset_intense_violet_blue | sunset_violet_mood | super_warm | super_warm_rich | sutro_fx | sweet_bubblegum | sweet_gelatto | tasdemirrr_1 | taiga | take_off | tarraco | teal-orange_for_flog | teal_fade | teal_moonlight | tealmagentagold | tealorange | tealorange_1 | tealorange_2 | tealorange_3 | technicalfx_backlight_filter | teigen_28 | tenet | tensiongreen_1 | tensiongreen_2 | tensiongreen_3 | tensiongreen_4 | terra_4 | the_dark_knight | the_darkest_hour | the_gentelmen | the_grand_budapest_hotel | the_hurt_locker | the_irishman | the_lighthouse | the_lobster | the_martian | the_matrices | the_revenant | the_shape_of_water | the_social_network | the_two_popes | the_way_back | thor_ragnarok | thriller_2 | tirare | toastedgarden | top_gun_maverick | trent_18 | true_colors_8 | turkiest_42 | tutto | tweed_71 | ultra_water | uncut_gems | undeniable | undeniable_2 | underwater | unknown | upglow | urban_01 | urban_02 | urban_03 | urban_04 | urban_05 | urban_cowboy | uzbek_bukhara | uzbek_marriage | uzbek_samarcande | valize | valsky | velvetia | venom | very_warm_greenish | vfb_21 | vibrant | vibrant_alien | vibrant_contrast | vibrant_cromeish | victory | vintage | vintage_01 | vintage_02 | vintage_03 | vintage_04 | vintage_05 | vintage_163 | vintage_alt | vintage_brighter | vintage_chrome | vintage_mob | vintage_warmth_1 | violet_taste | vireo_37 | vita | vivid | vubes | war_for_the_planet_of_the_apes | warm | warm_dark_contrasty | warm_fade | warm_fade_1 | warm_highlight | warm_neutral | warm_sunset_red | warm_teal | warm_vintage | warm_yellow | wavefire | waves | well_see | western | western_6 | westernlut_2 | westernlut_2_13 | whiter_whites | wingspan | winterlighthouse | wipe | wolf_of_wall_street | wonder_woman | wooden_gold_20 | x- men_dark_phoenix | yangabuz_8 | yellow_55b | yellow_film_01 | yellowstone | you_can_do_it | zed_32 | zeke_39 | zilverfx_bw_solarization | zilverfx_infrared | zilverfx_vintage_bw | zombieland_double_tap } . : 'resolution=33' 'cut_and_round=1'. : [#1] clut summer clut alien_green,17 clut orange_dark4,48 clut2hald: 3D CLUT 2D HaldCLUT. : [#1] clut summer +clut2hald cmy2rgb: CMY RGB. cmyk2rgb: CMYK RGB. colorblind: type={ 0:Protanopia | 1:Protanomaly | 2:Deuteranopia | 3:Deuteranomaly | 4:Tritanopia | 5:Tritanomaly | 6:Achromatopsia | 7:Achromatomaly } . Vienot, Brettel & Mollon (1999) "Digital video colormaps for checking the legibility of displays by dichromats". (dichromacy) sRGB (RGB->XYZ). 0.6 . : [#1] image.jpg +colorblind 0 colormap: nb_levels>=0,_method={ 0:Median-cut | 1:K-means },_sort_vectors 'nb_levels' . 'nb_levels==0' . 'sort_vectors' { 0:Do not sort | 1:By increasing norm | 2:By decreasing occurrence } . : 'method=1' 'sort_vectors=1'. : [#1] image.jpg +colormap[0] 4 +colormap[0] 8 +colormap[0] 16 : https://gmic.eu/oldtutorial/_colormap compose_channels: _operator (+,-,or,min,...). : 'operator=+'. : [#1] image.jpg +compose_channels and : https://gmic.eu/tutorial/compose_channelscontrast: strength . * 'strength' . * 'strength' . 'strength' [-100,100] . : [#1] image.jpg +contrast 20 count_colors: _count_until={ 0:None | >0:Max number of counted colors } . 'count_until' '0' . ( ) . deltaE: [image],_metric={ 0:DeltaE_1976 | 1:DeltaE_2000 },"_to_Lab_command" CIE DeltaE [image] . 'to_Lab_command' [image] Lab . : 'metric=1' 'to_Lab_command="srgb2lab"'. : [#1] image.jpg +blur 2 +deltaE[0] [1],1,srgb2lab direction2rgb: RGB . : [#1] image.jpg luminance gradient append c blur 2 orientation +direction2rgb ditheredbw: (dithered) . : [#1] image.jpg +equalize ditheredbw[-1] fc: 'fill_color'. fill_color: col1,...,colN . ( 'fc'). : [#1] image.jpg +fill_color 255,0,255 : https://gmic.eu/oldtutorial/_fill_color gradient2rgb: _is_orientation={ 0:No | 1:Yes } RGB . : 'is_orientation=0'. : [#1] image.jpg +gradient2rgb 0 equalize[-1] hald2clut: HaldCLUT CLUT . hcy2rgb: HCY RGB. hsi2rgb: HSI RGB. hsi82rgb: HSI8 RGB. hsl2rgb: HSL RGB. hsl82rgb: HSL8 RGB. hsv2rgb: HSV RGB. : [#1] (0,360;0,360^0,0;1,1^1,1;1,1) resize 400,400,1,3,3 hsv2rgb hsv82rgb: HSV8 RGB. int2rgb: INT24 RGB. ipremula: (premultiplied alpha) . : premula. jzazbz2rgb: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) RGB Jzazbz. : 'illuminant=2'. jzazbz2xyz: RGB XYZ. lab2lch: Lab Lch. lab2rgb: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) Lab RGB. : 'illuminant=2'. : [#1] (50,50;50,50^-3,3;-3,3^-3,-3;3,3) resize 400,400,1,3,3 lab2rgb lab2srgb: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) Lab sRGB. : 'illuminant=2'. : [#1] (50,50;50,50^-3,3;-3,3^-3,-3;3,3) resize 400,400,1,3,3 lab2rgb lab82srgb: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) Lab8 sRGB. : 'illuminant=2'. : [#1] (50,50;50,50^-3,3;-3,3^-3,-3;3,3) resize 400,400,1,3,3 lab2rgb lab2xyz: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) Lab XYZ. : 'illuminant=2'. lab82rgb: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) Lab8 RGB. : 'illuminant=2'. lch2lab: Lch Lab. lch2rgb: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) Lch RGB. : 'illuminant=2'. lch82rgb: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) Lch8 RGB. : 'illuminant=2'. luminance: (luminance) sRGB . : [#1] image.jpg +luminance : https://gmic.eu/tutorial/luminance lightness: (lightness) sRGB . : [#1] image.jpg +lightness lut_contrast: _nb_colors>1,_min_rgb_value (colormap) RGB . 'nb_colors' . : 'nb_colors=256' 'min_rgb_value=64'. map_clut: [clut] | "clut_name" (color LUT) RGB . : [#1] image.jpg uniform_distribution {2^6},3 mirror[-1] x +map_clut[0] [1] transfer_histogram: [style],_nb_levels>0,_color_channels (style) . 'color channels' 'apply_channels' . : 'nb_levels=256' 'color_channels=all'. : [#1] image.jpg 100,100,1,3,"u([256,200,100])" +transfer_histogram[0] [1] transfer_pca: [style],_color_channels (vector-valued style) . 'color channels' 'apply_channels' . : 'color_channels=all'. : [#1] sample lena,earth +transfer_pca[0] [1]transfer_rgb: [style],_rgb_smoothness>0,_beta>0,_regul_iterations>=0,_brightness_constraint>=0,_transfer_avg_std={ 0:No | 1:Avg-only | 2 | Avg-Std },_colorspace={ 0:srgb | 1:lrgb | 2:ycbcr | 3:lab },_resolution3d>0,[color_constraints],_lambda>=0 RGB (3D variational registration). '[color_constraints]' 6D : [ Rimg,Gimg,Bimg, Rstyle,Gstyle,Bstyle ] : 'rgb_smoothness=0.01' 'beta=1' 'regul_iterations=3' 'brightness_constraint=0.35' 'transfer_avg_std=0' 'colorspace=0' 'resolution3d=32' '[color_constraints]=(undefined)' 'lambda=1000'. : [#1] sample colorful,eagle +transfer_rgb[0] [1] [#2] sample pencils,wall +transfer_rgb[0] [1] mix_rgb: a11,a12,a13,a21,a22,a23,a31,a32,a33 3x3 RGB . : 'a11=1' 'a12=a13=a21=0' 'a22=1' 'a23=a31=a32=0' 'a33=1'. : [#1] image.jpg +mix_rgb 0,1,0,1,0,0,0,0,1 : https://gmic.eu/tutorial/mix_rgb oklab2rgb: OKlab RGB. ( : https://bottosson.github.io/posts/oklab ). : rgb2oklab. palette: palette_name | palette_number . 'palette_name' { default | hsv | lines | hot | cool | jet | flag | cube | rainbow | parula | spring | summer | autumn | winter | bone | copper | pink | vga | algae | amp | balance | curl | deep | delta | dense | diff | gray | haline | ice | matter | oxy | phase | rain | solar | speed | tarn | tempo | thermal | topo | turbid | aurora | hocuspocus | srb2 | uzebox | amiga7800 | amiga7800mess | fornaxvoid1 } . : [#1] palette hsv premula: (premultiplied alpha). [0,1] . : ipremula. pseudogray: _max_increment>=0,_JND_threshold>=0,_bits_depth>0 (pseudogray colormap) . 'JND_threshold' 0 . : 'max_increment=5' 'JND_threshold=2.3' 'bits_depth=8'. : [#1] pseudogray 5 random_clut: CLUT 33x33x33. : [#1] image.jpg random_clut +map_clut.. . random_clut: _seed = { >=0 | -1 } CLUT 33x33x33. 'seed' @cli : ( CLUT ). : [#1] image.jpg random_clut +map_clut.. . replace_color: tolerance[%]>=0,smoothness[%]>=0,src1,src2,...,dest1,dest2,... / . : [#1] image.jpg +replace_color 40,3,204,153,110,255,0,0 retinex: _value_offset>0,_colorspace={ hsi | hsv | lab | lrgb | rgb | ycbcr },0<=_min_cut<=100,0<=_max_cut<=100,_sigma_low>0,_sigma_mid>0,_sigma_high>0 . ( http://www.ipol.im/pub/art/2014/107 ). : 'offset=1' 'colorspace=hsv' 'min_cut=1' 'max_cut=1' 'sigma_low=15' 'sigma_mid=80' 'sigma_high=250'. rgb: _min_RGB_value,_max_RGB_value | (no arg) RGB (int-valued). rgba: _min_RGB_value,_max_RGB_value,_min_A_value,_max_A_value | (no_arg) RGBA (int-valued). rgb2bayer: _start_pattern=0,_color_grid=0 RGB-Bayer. : 'start_pattern=0' 'color_grid=0'. : [#1] image.jpg +rgb2bayer 0 rgb2cmy: RGB CMY. : [#1] image.jpg rgb2cmy split c rgb2cmyk: RGB CMYK. : [#1] image.jpg rgb2cmyk split c [#2] image.jpg rgb2cmyk split c fill[3] 0 append c cmyk2rgb rgb2hcy: RGB HCY. : [#1] image.jpg rgb2hcy split c rgb2hsi: RGB HSI. : [#1] image.jpg rgb2hsi split c rgb2hsi8: RGB HSI8. : [#1] image.jpg rgb2hsi8 split c rgb2hsl: RGB HSL. : [#1] image.jpg rgb2hsl split c [#2] image.jpg rgb2hsl +split c add[-3] 100 mod[-3] 360 append[-3--1] c hsl2rgb rgb2hsl8: RGB HSL8. : [#1] image.jpg rgb2hsl8 split c rgb2hsv: RGB HSV. : [#1] image.jpg rgb2hsv split c [#2] image.jpg rgb2hsv +split c add[-2] 0.3 cut[-2] 0,1 append[-3--1] c hsv2rgb rgb2hsv8: RGB HSV8. : [#1] image.jpg rgb2hsv8 split c rgb2int: RGB INT24. : [#1] image.jpg rgb2int rgb2jzazbz: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) RGB Jzazbz. : 'illuminant=2'. rgb2lab: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) RGB Lab. : 'illuminant=2'. rgb2lab8: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) RGB Lab8. : 'illuminant=2'. : [#1] image.jpg rgb2lab8 split c rgb2lch: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) RGB Lch. : 'illuminant=2'. : [#1] image.jpg rgb2lch split c rgb2lch8: illuminant={ 0:D50 | 1:D65 | 2:E } | (no arg) RGB Lch8. : 'illuminant=2'. : [#1] image.jpg rgb2lch8 split c rgb2luv: RGB LUV. : [#1] image.jpg rgb2luv split c rgb2oklab: RGB Oklab. ( : https://bottosson.github.io/posts/oklab ). : oklab2rgb.rgb2ryb: RGB RYB. : [#1] image.jpg rgb2ryb split c rgb2srgb: RGB sRGB. rgb2xyz: illuminant={ 0:D50 | 1:D65 | 2:E } | ( ) RGB XYZ. : 'illuminant=2'. : [#1] image.jpg rgb2xyz split c rgb2xyz8: illuminant={ 0:D50 | 1:D65 | 2:E } | ( ) RGB XYZ8. : 'illuminant=2'. : [#1] image.jpg rgb2xyz8 split c rgb2yiq: RGB YIQ. : [#1] image.jpg rgb2yiq split c rgb2yiq8: RGB YIQ8. : [#1] image.jpg rgb2yiq8 split c rgb2ycbcr: RGB YCbCr. : [#1] image.jpg rgb2ycbcr split c rgb2yuv: RGB YUV. : [#1] image.jpg rgb2yuv split c rgb2yuv8: RGB YUV8. : [#1] image.jpg rgb2yuv8 split c remove_opacity: (opacity) . ryb2rgb: RYB RGB. select_color: tolerance[%]>=0,col1,...,colN . : [#1] image.jpg +select_color 40,204,153,110 : https://gmic.eu/oldtutorial/_select_color sepia: (sepia) . : [#1] image.jpg sepia solarize: (solarize) . : [#1] image.jpg solarize split_colors: _max_nb_outputs>=0 . 'max_nb_outputs' . . 'max_nb_outputs==0' . : 'max_nb_outputs=0'. : [#1] image.jpg quantize 5 +split_colors , display_rgba split_opacity: . . split_vector: keep_splitting_values={ +:Increasing | -:Decreasing },value1,_value2,... '[value1,_value2,...]' . srgb2lab: illuminant={ 0:D50 | 1:D65 | 2:E } | ( ) sRGB Lab. : 'illuminant=2'. : [#1] image.jpg srgb2lab split c [#2] image.jpg srgb2lab +split c mul[-2,-1] 2.5 append[-3--1] c lab2srgb srgb2lab8: illuminant={ 0:D50 | 1:D65 | 2:E } | ( ) sRGB Lab8. : 'illuminant=2'. srgb2rgb: sRGB RGB . to_a: . to_color: (RGB RGBA). to_colormode: mode={ 0:Adaptive | 1:G | 2:GA | 3:RGB | 4:RGBA } . : 'mode=0'. to_gray: (GRAY). : [#1] image.jpg +to_gray to_graya: GRAYA. to_pseudogray: _max_step>=0,_is_perceptual_constraint={ 0:No | 1:Yes },_bits_depth>0 ( [0-255]) (pseudo-gray). : 'max_step=5' 'is_perceptual_constraint=1' 'bits_depth=8'. Rich Franzen http://r0k.us/graphics/pseudoGrey.html . David Tschumperle . to_rgb: RGB. to_rgba: RGBA. to_automode: . ( ) . xyz2jzazbz: XYZ RGB. xyz2lab: illuminant={ 0:D50 | 1:D65 | 2:E } | ( ) XYZ Lab. : 'illuminant=2'. xyz2rgb: illuminant={ 0:D50 | 1:D65 | 2:E } | ( ) XYZ RGB. : 'illuminant=2'. xyz82rgb: illuminant={ 0:D50 | 1:D65 | 2:E } | ( ) XYZ8 RGB. : 'illuminant=2'. ycbcr2rgb: YCbCr RGB. yiq2rgb: YIQ RGB. yiq82rgb: YIQ8 RGB. yuv2rgb: YUV RGB. yuv82rgb: YUV8 RGB. 11.7. (Geometry Manipulation) ----------------------------------------- a (+): 'append'.append (+): [image],axis,_centering | axis,_centering . ( 'a'). 'axis' { x | y | z | c } . 'centering' { 0:left-justified | 0.5:centered | 1:right-justified }. : 'centering=0'. : [#1] image.jpg split y,10 reverse append y [#2] image.jpg repeat 5 { +rows[0] 0,{10+18*$>}% } remove[0] append x,0.5 [#3] image.jpg append[0] [0],y append_tiles: _M>=0,_N>=0,0<=_centering_x<=1,0<=_centering_y<=1 MxN . 'N' 0 . 'M' 0 . 'M' 'N' '0' . 'M' 'N' 0 . 'centering_x' 'centering_y' . : 'M=0', 'N=0', 'centering_x=centering_y=0.5'. : [#1] image.jpg split xy,4 append_tiles , apply_scales: "command",number_of_scales>0,_min_scale[%]>=0,_max_scale[%]>=0,_scale_gamma>0,_interpolation . 'interpolation' { 0:None | 1:Nearest | 2:Average | 3:Linear | 4:Grid | 5:Bicubic | 6:Lanczos } . : 'min_scale=25%' 'max_scale=100%' 'interpolation=3'. : [#1] image.jpg apply_scales "blur 5 sharpen 1000",4 arrange: _"layout",-1<=_align_or_scale_factor<=1,_output_layers={ 0:Single | 1:Multiple (volumetric) | 2:Multiple (named) },_"processing_command" . 'layout' ( ): * : . * '?' : . * 'X' : ( ) . * 'Y' : ( ) . * 'R' : . * 'L' : . * 'H' : ( / ) . * 'V' : ( / ) . * 'B' : 'H' 'V' () . * 'Q' : . * 'F' : x y . * 'M' : . ( ';' ':') ( '0' '1' '01'). . : * '"H0:1"' 0 1 . * '"V0:1"' 0 1 . * '"VH0:1H2:3"' (0,1) (2,3) 2x2 . * '"H0R1"' 0 1 . 'layout' : * '"H"' : . * '"V"' : . * '"AH"' : . * '"AV"' : 'AH' . 'align_or_scale_factor' : * : '0' '1' . * . ('0': - '0.5': '1': -). 'output_layers' ('Single') ('Multiple') . 'processing_command' G'MIC ( ) ( ). : 'layout=AH', 'align_or_scale_factor=0.5', 'output_layers=0' 'processing_command=""'. : [#1] sample colorful,eagle,cat,dog +arrange "VH0:1H2:3" [#2] sample cat,dog,monkey,duck +arrange AH,-0.5 [#3] sample colorful,eagle,cat,dog,flower,rose arrange AH [#4] sample colorful,eagle,duck +arrange VH0R1:2,,,"sepia shrink xy,20 frame xy,8,255 frame xy,12,0" autocrop: _axes,_value1,_value2,... . 'axes' { x | y | z | c | xy | xz | xc | yz | yc | zc | xyz | xyc | xzc | yzc | xyzc } . 'axes' ( 'axes=xyz'). . : 'axes=xyz'. : autocrop_coords. : [#1] 400,400,1,3 fill_color 64,128,255 ellipse 50%,50%,120,120,0,1,255 +autocrop autocrop_components: _threshold[%],_min_area[%]>=0,_is_high_connectivity={ 0:No | 1:Yes },_output_type={ 0:Crop | 1:Segmentation | 2:Coordinates } ( ). : 'threshold=0%', 'min_area=0.1%', 'is_high_connectivity=0' 'output_type=1'. : [#1] 256,256 noise 0.1,2 eq 1 dilate_circ 20 label_fg 0,1 normalize 0,255 +neq 0 *[-1] 255 append c +autocrop_components , autocrop_coords: _axes,_value1,_value2,... . 'axes' { x | y | z | c | xy | xz | xc | yz | yc | zc | xyz | xyc | xzc | yzc | xyzc } . 'axes' ( 'axes=xyz'). . -1 . : 'axes=xyz'. : autocrop. autocrop_seq: value1,value2,... | auto . : auto. : [#1] image.jpg +fill[-1] 0 ellipse[-1] 50%,50%,30%,20%,0,1,1 autocrop_seq 0 channels: c0[%],_c1[%],_boundary_conditions . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'c1=c0' 'boundary_conditions=0'. : [#1] image.jpg channels 1 [#2] image.jpg luminance channels 0,2 columns: x0[%],_x1[%],_boundary_conditions . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'x1=x0' 'boundary_conditions=0'. : [#1] image.jpg columns -25%,50% z (+): 'crop'. crop (+): x0[%],x1[%],_boundary_conditions | x0[%],y0[%],x1[%],y1[%],_boundary_conditions | x0[%],y0[%],z0[%],x1[%],y1[%],z1[%],_boundary_conditions | x0[%],y0[%],z0[%],c0[%],x1[%],y1[%],z1[%],c1[%],_boundary_conditions . ( 'z'). 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=0'. : [#1] image.jpg +crop -230,-230,280,280,1 crop[0] -230,-230,280,280,0 [#2] image.jpg crop 25%,25%,75%,75% elevate: _depth,_is_plain={ 0:No | 1:Yes },_is_colored={ 0:No | 1:Yes } . : 'depth=64', 'is_plain=1' 'is_colored=1'. : [#1] sample colorful,64 +elevate 32 expand: axes,size[%],_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'axes' { x | y | z | c | xy | xz | xc | yz | yc | zc | xyz | xyc | xzc | yzc | xyzc } . : 'boundary_conditions=0'. : [#1] image.jpg expand xy,30 extract: "condition",_output_type={ 0:XYZC-coords | 1:XYZ-coords | 2:Scalar-values | 3:Vector-values | 4:XYZC-coords + scalar value | 5:XYZ-coords + vector-values } . N 1xNx1x4 . : 'output_type=0'. : [#1] sp lena +extract "norm(I)>128",3 extract_region: [label_image],_extract_xyz_coordinates={ 0:No | 1:Yes },_label_1,...,_label_M '[label_image]' 'label_m' M . : 'extract_xyz_coordinates=0'. : [#1] image.jpg +blur 3 quantize. 4,0 +extract_region[0] [1],0,1,3 mirror (+): { x | y | z }...{ x | y | z } . : [#1] image.jpg +mirror y +mirror[0] c [#2] image.jpg +mirror x +mirror y append_tiles 2,2 permute (+): permutation () . 'permutation' {x|y|z|c} 'xycz', 'cxyz', ...: [#1] image.jpg permute yxzc rs: 'rescale2d'. rescale2d: _width[%]={ 0:Any | >0 },_height[%]={ 0:Any | >0 },-1=<_interpolation<=6,_mode={ 0:Inside | 1:Padded-inside | 2:Outside | 3:Cropped-outside } . 'interpolation' { -1:Status only | 0:None | 1:Nearest | 2:Average | 3:Linear | 4=Grid | 5=Bicubic | 6=Lanczos } . 'interpolation==-1' (status) . 'mode' : * 'mode==0' '(width,height)' . * 'mode==1' 'mode==3' '(width,height)' . * 'mode==2' '(width,height)' . ( 'rs'). : 'width=height=0' 'interpolation=2' 'mode=0'. rs3d: 'rescale3d'. rescale3d: _width[%]={ 0:Any | >0 },_height[%]={ 0:Any | >0 },_depth[%]={ 0:Any | >0 },-1=<_interpolation<=6,_mode={ 0:Inside | 1:Padded-inside | 2:Outside | 3 | Cropped-outside } . 'interpolation' { -1:Status only | 0:None | 1:Nearest | 2:Average | 3:Linear | 4=Grid | 5=Bicubic | 6=Lanczos } . 'interpolation==-1' (status) . 'mode' : * 'mode==0' '(width,height)' . * 'mode==1' 'mode==3' '(width,height)' . * 'mode==2' '(width,height)' . ( 'rs3d'). : 'width=height=depth=0' 'interpolation=2' 'mode=0'. r (+): 'resize'. resize (+): {[image_w] | width[%]>0},_{[image_h] | height[%]>0},_{[image_d] | depth[%]>0},_{[image_s] | spectrum[%]>0},_interpolation,_boundary_conditions,_ax, _ay,_az,_ac . ( 'r'). 'interpolation' { -1:None (memory content) | 0:None | 1:Nearest | 2:Average | 3:Linear | 4=Grid | 5=Bicubic | 6=Lanczos } . 'boundary_conditions' 'interpolation' : . 'interpolation=={ -1 | 1 | 2 | 4 }' 'boundary_conditions' . . 'interpolation==0' 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . . 'interpolation=={ 3 | 5 | 6 }' 'boundary_conditions' { 0:None | 1:Neumann } . 'ax,ay,az,ac' 'interpolation=0 or 4' ( '0' [0,1] ). : 'interpolation=1' 'boundary_conditions=0' 'ax=ay=az=ac=0'. : [#1] image.jpg +resize[-1] 256,128,1,3,2 +resize[-1] 120%,120%,1,3,0,1,0.5,0.5 +resize[-1] 120%,120%,1,3,0,0,0.2,0.2 +resize[-1] [0],[0],1,3,4 ri: 'resize_as_image'. resize_as_image: [reference],_interpolation,_boundary_conditions,_ax,_ay,_az,_ac [reference] . ( 'ri'). : 'interpolation=1' 'boundary_conditions=0' 'ax=ay=az=ac=0'. : [#1] image.jpg sample duck +resize_as_image[-1] [-2] resize_displacement: width[%]>0,_height[%]>0,_depth[%]>0 . . : 'height=100%' 'depth=100%'. resize_mn: width[%]>=0,_height[%]>=0,_depth[%]>=0,_B_value,_C_value Mitchell- Netravali (). : https://de.wikipedia.org/wiki/Mitchell-Netravali-Filter. : 'height=100%' 'depth=100%' 'B=0.3333' 'C=0.3333'. : [#1] image.jpg rescale2d 32 resize_mn 800%,800% resize_pow2: _interpolation,_boundary_conditions,_ax,_ay,_az,_ac . 'interpolation' { -1:None (memory content) | 0:None | 1:Nearest | 2:Average | 3:Linear | 4:Grid | 5:Bicubic | 6:Lanczos } . 'boundary_conditions' 'interpolation' : . 'interpolation=={ -1 | 1 | 2 | 4 }' 'boundary_conditions' . . 'interpolation==0' 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . . 'interpolation=={ 3 | 5 | 6 }' 'boundary_conditions' { 0:None | 1:Neumann } . 'ax,ay,az,ac' 'interpolation=0' ( '0' [0,1] ). : 'interpolation=0' 'boundary_conditions=0' 'ax=ay=az=ac=0'. : [#1] image.jpg +resize_pow2[-1] 0 rotate (+): angle,_interpolation,_boundary_conditions,_center_x[%],_center_y[%] | u,v,w,angle,interpolation,boundary_conditions,_center_x[%],_center_y[%],_center_z[%] ( ) (u,v,w). 'interpolation' { 0:None | 1:Linear | 2:Bicubic } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . (cx,cy,_cz) . : 'interpolation=1' 'boundary_conditions=0' 'center_x=center_y=(undefined)'. : [#1] image.jpg +rotate -25,1,2,50%,50% rotate[0] 25 rotate_tileable: angle,_max_size_factor>=0 . 1x1 . : 'max_size_factor=8'. : [#1] sample colorful,128 +rotate_tileable 16 rows: y0[%],_y1[%],_boundary_conditions . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'y1=y0' 'boundary_conditions=0'. : [#1] image.jpg rows -25%,50% scale2x: XY Scale2x. : [#1] image.jpg threshold 50% resize 50%,50% +scale2x scale2x_cnn: _sharpness>=0 XY . : 'sharpness=1.25'. : [#1] image.jpg rescale2d 128 +scale2x_cnn , scale3x: XY Scale3x. : [#1] image.jpg threshold 50% resize 33%,33% +scale3x scale_dcci2x: _edge_threshold>=0,_exponent>0,_extend_1px={ 0:No | 1:Yes } XY https://en.wikipedia.org/wiki/Directional_Cubic_Convolution_Interpolation . : 'edge_threshold=1.15' 'exponent=5' 'extend_1px=0'. : [#1] image.jpg rescale2d 128 +scale_dcci2x , seamcarve: _width[%]>=0,_height[%]>=0,_is_priority_channel={ 0:No | 1:Yes },_is_antialiasing={ 0:No | 1:Yes },_maximum_seams[%]>=0 seam-carving. : 'height=100%' 'is_priority_channel=0' 'is_antialiasing=1' 'maximum_seams=25%'. : [#1] image.jpg seamcarve 60% shift (+): vx[%],_vy[%],_vz[%],_vc[%],_boundary_conditions,_interpolation={ 0:Nearest_neighbor | 1:Linear } . . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=0' 'interpolation=0'. : [#1] image.jpg +shift[0] 50%,50%,0,0,0 +shift[0] 50%,50%,0,0,1 +shift[0] 50%,50%,0,0,2 shrink: axes,size[%],_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'axes' { x | y | z | c | xy | xz | xc | yz | yc | zc | xyz | xyc | xzc | yzc | xyzc } . : 'boundary_conditions=0'. : [#1] image.jpg shrink xy,100 slices: z0[%],_z1[%],_boundary_conditions . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'z1=z0' 'boundary_conditions=0'. sort (+): _ordering={ +:Increasing | -:Decreasing },_axis={ x | y | z | c } . 'axis' /// . : 'ordering=+' 'axis=(undefined)'. : [#1] 64 rand 0,100 +sort display_graph 400,300,3 s (+): 'split'. split (+): { x | y | z | c }...{ x | y | z | c },_split_mode[%],_max_parts>0 | keep_splitting_values={ +:Increasing | -:Decreasing },_{ x | y | z | c }...{ x | y | z | c },value1,_value2,... | (no arg) ( ). ( 's'). 'split_mode' . : * '0': * 'N' ( 'N' ): 'N' * '-N[%]' ( 'N' ): 'N' ( ). 'max_parts' . : 'N=-1'. : [#1] image.jpg split c [#2] image.jpg split y,3 [#3] image.jpg split x,-128 [#4] image.jpg split x,-30%,2 [#5] 1,20,1,1,"1,2,3,4" +split -,2,3 append[1--1] y [#6] (1,2,2,3,3,3,4,4,4,4) +split x,0 append[1--1] y split_tiles: M!=0,_N!=0,_is_homogeneous={ 0:No | 1:Yes } MxN . M N . : 'N=M' 'is_homogeneous=0'. : [#1] image.jpg +local split_tiles 5,4 blur 3,0 sharpen 700 append_tiles 4,5 done undistort: -1<=_amplitude<=1,_aspect_ratio,_zoom,_center_x[%],_center_y[%],_boundary_conditions / (wide-angle). : [1] Zhang Z. (1999). Flexible camera calibration by viewing a plane from unknown orientation. [2] Andrew W. Fitzgibbon (2001). Simultaneous linear estimation of multiple view geometry and lens distortion. 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'amplitude=0.25' 'aspect_ratio=0' 'zoom=0' 'center_x=center_y=50%' 'boundary_conditions=0'. y (+): 'unroll'. unroll (+): _axis={ x | y | z | c } (unroll) . ( 'y'). : 'axis=y'. : [#1] (1,2,3;4,5,6;7,8,9) +unroll y upscale_smart: width[%],_height[%],_depth,_smoothness>=0,_anisotropy=[0,1],sharpening>=0 . : 'height=100%' 'depth=100%' 'smoothness=2' 'anisotropy=0.4' 'sharpening=10'. : [#1] image.jpg rescale2d ,100 +upscale_smart 500%,500% append x volumetric2d: _x[%],_y[%],_z[%],_separator_size>=0 (volumetric) . : 'x=y=z=50%' 'separator_size=0'. : [#1] image.jpg rescale2d 64 animate noise,0,100,50 cut 0,255 append z volumetric2d 50%,50%,50%,1 11.8. (Filtering) ------------------------- bandpass: _min_freq[%],_max_freq[%] (bandpass) . : 'min_freq=0' 'max_freq=20%'. : [#1] image.jpg bandpass 1%,3% : https://gmic.eu/oldtutorial/_bandpass bilateral (+): [guide],std_deviation_s[%]>=0,std_deviation_r[%]>=0,_sampling_s>=0,_sampling_r>=0 | std_deviation_s[%]>=0,std_deviation_r[%]>=0,_sampling_s>=0,_sampling_r>=0 ( / joint/cross). (guide) . xyz . 'sampling' '0' . : [#1] image.jpg repeat 5 { bilateral 10,10 } b (+): 'blur'. blur (+): std_deviation[%]>=0,_boundary_conditions,_kernel | axes,std_deviation[%]>=0,_boundary_conditions,_kernel Deriche ( ). ( 'b'). 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'kernel' { 0:Deriche | 1:Gaussian } . 'axes' { x | y | z | c } . . : 'boundary_conditions=1' 'kernel=1'. : [#1] image.jpg +blur 5,0 +blur[0] 5,1 [#2] image.jpg +blur y,10% : https://gmic.eu/oldtutorial/_blur blur_angular: amplitude[%],_center_x[%],_center_y[%] . : 'center_x=center_y=50%'. : [#1] image.jpg blur_angular 2% : https://gmic.eu/oldtutorial/_blur_angular blur_bloom: _amplitude>=0,_ratio>=0,_nb_iter>=0,_blend_operator={ + | max | min },_kernel={ 0:Deriche | 1:Gaussian | 2:Box | 3:Triangle | 4:Quadratic }, _normalize_scales={ 0:No | 1:Yes },_axes (bloom) . 'axes' { x | y | z | c } . . : Masaki Kawase, "Practical Implementation of High Dynamic Range Rendering", GDC 2004. : 'amplitude=1' 'ratio=2' 'nb_iter=5' 'blend_operator=+' 'kernel=1' 'normalize_scales=0' 'axes=(all)' : [#1] image.jpg blur_bloom , blur_linear: amplitude1[%],_amplitude2[%],_angle,_boundary_conditions={ 0:Dirichlet | 1:Neumann } . : 'amplitude2=0' 'angle=0' 'boundary_conditions=1'. : [#1] image.jpg blur_linear 10,0,45 : https://gmic.eu/oldtutorial/_blur_linear blur_radial: amplitude[%],_center_x[%],_center_y[%] . : 'center_x=center_y=50%'. : [#1] image.jpg blur_radial 2% : https://gmic.eu/oldtutorial/_blur_radial blur_selective: sigma>=0,_edges>0,_nb_scales>0 . : 'sigma=5' 'edges=0.5' 'nb_scales=5'. : [#1] image.jpg noise 20 cut 0,255 +local[-1] repeat 4 { blur_selective , } done : https://gmic.eu/oldtutorial/_blur_selective boxfilter (+): size[%]>=0,_order,_boundary_conditions,_nb_iter>=0 | axes,size[%]>=0,_order,_boundary_conditions,_nb_iter>=0 (box filter) ( ). 'order' { 0:Smooth | 1:1st-derivative | 2:2nd-derivative } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'axes' { x | y | z | c } . . : 'order=0' 'boundary_conditions=1' 'nb_iter=1'. : [#1] image.jpg +boxfilter 5% [#2] image.jpg +boxfilter y,3,1 bump2normal: (bumpmap) (normalmap). : [#1] 300,300 circle 50%,50%,128,1,255 blur 2% +bump2normal closing: size>=0 | size_x>=0,size_y>=0,_size_z>=0 | [kernel],_boundary_conditions,_is_real={ 0:Binary-mode | 1:Real- mode } (morphological closing) . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'size_z=1' 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +closing 10 closing_circ: _size>=0,_is_real={ 0:No | 1:Yes } . : 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +closing_circ 7 convolve (+): [mask],_boundary_conditions,_is_normalized={ 0:No | 1:Yes },_channel_mode,_xcenter,_ycenter,_zcenter,_xstride>0,_ystride>0,_zstride>0,_xdilation, _ydilation,_zdilation,_xoffset,_yoffset,_zoffset,_xsize>=0,_ysize>=0,_zsize>=0 () . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'channel_mode' { 0:All | 1:One-for-one | 2:Partial sum | 3:Full sum } . : 'center' ('xcenter','ycenter','zcenter') 'stride' ('xstride', 'ystride','zstride') 'dilation' ('xdilation','ydilation','zdilation') 'offset' ('xoffset','yoffset', 'zoffset') 'size' ('xsize','ysize','zsize') . ( 'xoffset' 'yoffset' 'zoffset' ). : 'boundary_conditions=1' 'is_normalized=0' 'channel_mode=1' 'xcenter=ycenter=zcenter=(undefined)' 'xstride=ystride=zstride=1' 'xdilation=ydilation=zdilation=1' 'xoffset=yoffset=zoffset=0' 'xsize=ysize=zsize=(input_size/stride)'. : [#1] image.jpg (0,1,0;1,-4,1;0,1,0) convolve[-2] [-1] keep[-2] [#2] image.jpg (0,1,0) resize[-1] 130,1,1,1,3 +convolve[0] [1] : https://gmic.eu/oldtutorial/_convolveconvolve_fft: [mask],_boundary_conditions . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : [#1] image.jpg 100%,100% gaussian[-1] 20,1,45 +convolve_fft[0] [1] correlate (+): [mask],_boundary_conditions,_is_normalized={ 0:No | 1:Yes },_channel_mode,_xcenter,_ycenter,_zcenter,_xstride>0,_ystride>0,_zstride>0,_xdilation, _ydilation,_zdilation,_xoffset,_yoffset,_zoffset,_xsize>=0,_ysize>=0,_zsize>=0 . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'channel_mode' { 0:All | 1:One-for-one | 2:Partial sum | 3:Full sum } . : 'center' ('xcenter' 'ycenter' 'zcenter') 'stride' ('xstride' 'ystride' 'zstride') 'dilation' ('xdilation' 'ydilation' 'zdilation') 'offset' ('xoffset' 'yoffset' 'zoffset') 'size' ('xsize' 'ysize' 'zsize') . ( 'xoffset' 'yoffset' 'zoffset' ). : 'boundary_conditions=1' 'is_normalized=0' 'channel_mode=1' 'xcenter=ycenter=zcenter=-1' 'xstride=ystride=zstride=1' 'xdilation=ydilation=zdilation=1' 'xoffset=yoffset=zoffset=0' 'xsize=ysize=zsize=(input_size/stride)'. : [#1] image.jpg (0,1,0;1,-4,1;0,1,0) correlate[-2] [-1] keep[-2] [#2] image.jpg +crop 40%,40%,60%,60% +correlate[0] [-1],0,1 cross_correlation: [mask] . : [#1] image.jpg +shift -30,-20 +cross_correlation[0] [1] curvature: . : [#1] image.jpg blur 10 curvature dct: _{ x | y | z }...{ x | y | z } | (no arg) (DCT) . . : (no arg) : idct. : [#1] image.jpg +dct +idct[-1] abs[-2] +[-2] 1 log[-2] : https://gmic.eu/oldtutorial/_dct-and-idct deblur: amplitude[%]>=0,_nb_iter>=0,_dt>=0,_regul>=0,_regul_type={ 0:Tikhonov | 1:Meancurv. | 2:TV } Jansson- Van Cittert. : 'nb_iter=10' 'dt=20' 'regul=0.7' 'regul_type=1'. : [#1] image.jpg blur 3 +deblur 3,40,20,0.01 deblur_goldmeinel: sigma>=0,_nb_iter>=0,_acceleration>=0,_kernel_type={ 0:Deriche | 1:Gaussian }. Gold-Meinel. : 'nb_iter=8' 'acceleration=1' 'kernel_type=1'. : [#1] image.jpg +blur 1 +deblur_goldmeinel[-1] 1 deblur_richardsonlucy: sigma>=0, nb_iter>=0, _kernel_type={ 0:Deriche | 1:Gaussian }. Richardson-Lucy. : 'nb_iter=50' 'kernel_type=1'. : [#1] image.jpg +blur 1 +deblur_richardsonlucy[-1] 1 deconvolve_fft: [kernel],_regularization>=0 . : 'regularization>=0'. : [#1] image.jpg +gaussian 5 +convolve_fft[0] [1] +deconvolve_fft[-1] [1] deinterlace: _method (Deinterlace) ('method' { 0:Standard | 1:Motion-compensated } ). : 'method=0'. : [#1] image.jpg +rotate 3,1,1,50%,50% resize 100%,50% resize 100%,200%,1,3,4 shift[-1] 0,1 add +deinterlace 1 denoise (+): [guide],std_deviation_s[%]>=0,std_deviation_r[%]>=0,_patch_size>0,_lookup_size>0,_smoothness,_fast_approx={ 0:No | 1:Yes } | std_deviation_s[%]>=0,std_deviation_r[%]>=0,_patch_size>0,_lookup_size>0,_smoothness,_fast_approx={ 0:No | 1:Yes } (non-local patch averaging). : 'patch_size=5' 'lookup_size=6' 'smoothness=1'. : [#1] image.jpg noise 20 cut 0,255 +denoise 8,8,7 denoise_haar: _threshold>=0,_nb_scales>=0,_cycle_spinning>0 (cycle spinning). 'nb_scales==0' . : 'threshold=1.4' 'nb_scale=0' 'cycle_spinning=10'. : [#1] image.jpg noise 20 cut 0,255 +denoise_haar[-1] 0.8 denoise_cnn: _noise_level>=0,_patch_size>0 (CNN). [0,255] . [0,255] . 'std_noise==0' . : 'noise_level=0 (auto)' 'patch_size=64'. : [#1] image.jpg noise 20 cut 0,255 +denoise_cnn 0 denoise_patchpca: _strength>=0,_patch_size>0,_lookup_size>0,_spatial_sampling>0 patch-pca. : 'patch_size=7' 'lookup_size=11' 'details=1.8' 'spatial_sampling=5'. : [#1] image.jpg +noise 20 cut[-1] 0,255 +denoise_patchpca[-1] , deriche (+): std_deviation[%]>=0,order={ 0 | 1 | 2 },axis={ x | y | z | c },_boundary_conditions Deriche . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=1'. : [#1] image.jpg deriche 3,1,x [#2] image.jpg +deriche 30,0,x deriche[-2] 30,0,y add : https://gmic.eu/oldtutorial/_deriche dilate (+): size[%]>=0 | size_x[%]>=0,size_y[%]>=0,size_z[%]>=0 | [kernel],_boundary_conditions,_is_real={ 0:Binary-mode | 1:Real- mode } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'size_z=1' 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +dilate 10 dilate_circ: _size[%]>=0,_boundary_conditions,_is_real={ 0:No | 1:Yes } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +dilate_circ 7 dilate_oct: _size[%]>=0,_boundary_conditions,_is_real={ 0:No | 1:Yes } . : 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +dilate_oct 7 dilate_threshold: size_x>=1,size_y>=1,size_z>=1,_threshold>=0,_boundary_conditions (X,Y,Z,I). 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'size_y=size_x' 'size_z=1' 'threshold=255' 'boundary_conditions=1'. divergence: . : [#1] image.jpg luminance +gradient append[-2,-1] c divergence[-1] dog: _sigma1[%]>=0,_sigma2[%]>=0 (DoG) . : 'sigma1=2%' 'sigma2=3%'. : [#1] image.jpg dog 2,3 diffusiontensors: _sharpness>=0,0<=_anisotropy<=1,_alpha[%],_sigma[%],is_sqrt={ 0:No | 1:Yes } . : 'sharpness=0.7' 'anisotropy=0.3' 'alpha=0.6' 'sigma=1.1' 'is_sqrt=0'. : [#1] image.jpg diffusiontensors 0.8 abs pow 0.2 : https://gmic.eu/oldtutorial/_diffusiontensors erode (+): size[%]>=0 | size_x[%]>=0,size_y[%]>=0,_size_z[%]>=0 | [kernel],_boundary_conditions,_is_real={ 0:Binary-mode | 1:Real- mode } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'size_z=1' 'boundary_conditions=1' 'is_real=0'.: [#1] image.jpg +erode 10 erode_circ: _size[%]>=0,_boundary_conditions,_is_real={ 0:No | 1:Yes } (erosion) . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +erode_circ 7 erode_oct: _size[%]>=0,_boundary_conditions,_is_real={ 0:No | 1:Yes } . : 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +erode_oct 7 erode_threshold: size_x>=1,size_y>=1,size_z>=1,_threshold>=0,_boundary_conditions (X,Y,Z,I). 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'size_y=size_x' 'size_z=1' 'threshold=255' 'boundary_conditions=1'. fft (+): _{ x | y | z }...{ x | y | z } ( ) . : ifft. : [#1] image.jpg luminance +fft append[-2,-1] c norm[-1] log[-1] shift[-1] 50%,50%,0,0,2 [#2] image.jpg w2:=int(w/2) h2:=int(h/2) fft shift $w2,$h2,0,0,2 ellipse $w2,$h2,30,30,0,1,0 shift -$w2,-$h2,0,0,2 ifft remove[-1] : https://gmic.eu/oldtutorial/_fft g (+): 'gradient'. gradient: { x | y | z | c }...{ x | y | z | c },_scheme,_boundary_conditions | (no arg) ( ) . ( 'g'). 'scheme' { -1:Backward | 0:Centered | 1:Forward | 2:Sobel | 3:Rotation-invariant () | 4:Deriche | 5:Vanvliet | 6:FB-Maxabs } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . ( ) . : 'scheme=0' 'boundary_conditions=1'. : [#1] image.jpg gradient : https://gmic.eu/oldtutorial/_gradient gradient_norm: _scheme,_boundary_conditions | (no arg) . 'scheme' { -1:Backward | 0:Centered | 1:Forward | 2:Sobel | 3:Rotation-invariant () | 4:Deriche | 5:Vanvliet | 6:FB-Maxabs } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'scheme=0' 'boundary_conditions=1'. : [#1] image.jpg gradient_norm equalize : https://gmic.eu/oldtutorial/_gradient_norm gradient_orientation: _dimension={ 1 | 2 | 3 } N- . : 'dimension=3'. : [#1] image.jpg +gradient_orientation 2 guided (+): [guide],radius[%]>=0,regularization[%]>=0 | radius[%]>=0,regularization[%]>=0 (guided image filtering). (guide) . xyz . : He, Kaiming; Sun, Jian; Tang, Xiaoou, "Guided Image Filtering", IEEE Transactions on Pattern Analysis and Machine Intelligence, vol.35, no.6, pp.1397,1409, June 2013 : [#1] image.jpg +guided 5,400 haar: scale>0 (haar) . : ihaar. : https://gmic.eu/oldtutorial/_haar heat_flow: _nb_iter>=0,_dt,_keep_sequence={ 0:No | 1:Yes } (heat flow) . : 'nb_iter=10' 'dt=30' 'keep_sequence=0'. : [#1] image.jpg +heat_flow 20 hessian: { xx | xy | xz | yy | yz | zz }...{ xx | xy | xz | yy | yz | zz },_boundary_conditions | (no arg) : ( ) . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . ( ) . : 'boundary_conditions=1'. : [#1] image.jpg hessian idct: _{ x | y | z }...{ x | y | z } | (no arg) . . ( dct 'dct' ). : ( ) : dct. : https://gmic.eu/oldtutorial/_dct-and-idct iee: (). : [#1] image.jpg iee ifft (+): _{ x | y | z }...{ x | y | z } ( ) . : fft. : https://gmic.eu/oldtutorial/_fft ihaar: scale>0 (haar) . : haar. : https://gmic.eu/oldtutorial/_haar ilaplacian: { nb_iterations>0 | 0 },_[initial_estimate] . 'nb_iterations' '0' () 'nb_iterations' PDE . / . : 'nb_iterations=0' 'axes=(undefined)' '[initial_estimated]=(undefined)'. : [#1] image.jpg +laplacian +ilaplacian[-1] 0 inn: (). : [#1] image.jpg inn inpaint (+): [mask] | [mask],0,_fast_method | [mask],_patch_size>=1,_lookup_size>=1,_lookup_factor>=0,_lookup_increment!=0,_blend_size>=0,0<=_blend_threshold<=1,_blend_decay>=0,_blend_scales>=1, _is_blend_outer={ 0:No | 1:Yes } (Inpaint) . ( 0 ) . (patch-based) . 'fast_method' { 0:Low-connectivity average | 1:High-connectivity average | 2:Low-connectivity median | 3:High- connectivity median } . : 'patch_size=0' 'fast_method=1' 'lookup_size=22' 'lookup_factor=0.5' 'lookup_increment=1' 'blend_size=0' 'blend_threshold=0' 'blend_decay=0.05' 'blend_scales=10' 'is_blend_outer=1'. : [#1] image.jpg 100%,100% ellipse 50%,50%,30,30,0,1,255 ellipse 20%,20%,30,10,0,1,255 +inpaint[-2] [-1] remove[-2] [#2] image.jpg 100%,100% circle 30%,30%,30,1,255,0,255 circle 70%,70%,50,1,255,0,255 +inpaint[0] [1],5,15,0.5,1,9,0 remove[1] inpaint_pde: [mask],_nb_scales[%],_diffusion_type={ 0:Isotropic | 1:Delaunay- guided | 2:Edge-guided | 3:Mask-guided },_diffusion_iter>=0 - (transport-diffusion). 'nb_scales' . * '%' 'nb_scales' 'nb_scales_max = ceil(log2(max(w,h,d)))' . * 'nb_scales<0' . 'diffusion_type==3' ( ) . : 'nb_scales=-9' 'diffusion_type=1' 'diffusion_iter=20'. : [#1] image.jpg 100%,100% ellipse[-1] 30%,30%,40,30,0,1,255 +inpaint_pde[0] [1] inpaint_flow: [mask],_nb_global_iter>=0,_nb_local_iter>=0,_dt>0,_alpha>=0,_sigma>=0 . : 'nb_global_iter=10' 'nb_local_iter=100' 'dt=5' 'alpha=1' 'sigma=3'. : [#1] image.jpg 100%,100% ellipse[-1] 30%,30%,40,30,0,1,255 inpaint_flow[0] [1] inpaint_holes: maximal_area[%]>=0,_tolerance>=0,_is_high_connectivity={ 0:No | 1:Yes } . : 'maximal_area=4' 'tolerance=0' 'is_high_connectivity=0'. : [#1] image.jpg noise 5%,2 +inpaint_holes 8,40 inpaint_morpho: [mask] . : [#1] image.jpg 100%,100% ellipse[-1] 30%,30%,40,30,0,1,255 +inpaint_morpho[0] [1] inpaint_matchpatch: [mask],_nb_scales={ 0:Auto | >0 },_patch_size>0,_nb_iterations_per_scale>0,_blend_size>=0,_allow_outer_blending={ 0:No | 1:Yes }, _is_already_initialized={ 0:No | 1:Yes } () (multi-scale matchpatch). : 'nb_scales=0' 'patch_size=9' 'nb_iterations_per_scale=10' 'blend_size=5' 'allow_outer_blending=1' 'is_already_initialized=0'. : [#1] image.jpg 100%,100% ellipse[-1] 30%,30%,40,30,0,1,255 +inpaint_matchpatch[0] [1] kuwahara: size>0 Kuwahara . : [#1] image.jpg kuwahara 9 laplacian: . : [#1] image.jpg laplacian lic: _amplitude>0,_channels>0 LIC ( ) . : 'amplitude=30' 'channels=1'. : [#1] 400,400,1,2,'[x,y]-[w,h]/2' +lic 200,3 quiver[-2] [-2],10,1,1,1,255 map_tones: _threshold>=0,_gamma>=0,_smoothness>=0,nb_iter>=0 (tone mapping) . : 'threshold=0.1' 'gamma=0.8' 'smoothness=0.5' 'nb_iter=30'. : [#1] image.jpg +map_tones , map_tones_fast: _radius[%]>=0,_power>=0 . : 'radius=3%' 'power=0.3'. : [#1] image.jpg +map_tones_fast , meancurvature_flow: _nb_iter>=0,_dt,_keep_sequence={ 0:No | 1:Yes } (mean curvature flow) . : 'nb_iter=10' 'dt=30' 'keep_sequence=0'. : [#1] image.jpg +meancurvature_flow 20 median (+): size>=0,_threshold>0 ( ) size x size. : [#1] image.jpg +median 5 merge_alpha: . split_alpha . nlmeans: [guide],_patch_radius>0,_spatial_bandwidth>0,_tonal_bandwidth>0,_patch_measure_command | _patch_radius>0,_spatial_bandwidth>0,_tonal_bandwidth>0,_patch_measure_command (non-local- means) () . 'std_patch_radius' . 'spatial_bandwidth' . ('exp(-d^2/_tonal_bandwidth^2)') 'd' . : 'patch_radius=4' 'spatial_bandwidth=4' 'tonal_bandwidth=10' 'patch_measure_command=-norm'. : [#1] image.jpg +noise 10 nlmeans[-1] 4,4,{0.6*${-std_noise}} nlmeans_core: _reference_image,_scaling_map,_patch_radius>0,_spatial_bandwidth>0 normalize_local: _amplitude>=0,_radius>0,_n_smooth[%]>=0,_a_smooth[%]>=0,_is_cut={ 0:No | 1:Yes },_min=0,_max=255 . : 'amplitude=3' 'radius=16' 'n_smooth=4%' 'a_smooth=2%' 'is_cut=1' 'min=0' 'max=255'. : [#1] image.jpg normalize_local 8,10 normalized_cross_correlation: [mask] (normalized cross-correlation) . : [#1] image.jpg +shift -30,-20 +normalized_cross_correlation[0] [1] opening: size>=0 | size_x>=0,size_y>=0,_size_z>=0 | [kernel],_boundary_conditions,_is_real={ 0:Binary-mode | 1:Real- mode } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'size_z=1' 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +opening 10 opening_circ: _size>=0,_is_real={ 0:No | 1:Yes } . : 'boundary_conditions=1' 'is_real=0'. : [#1] image.jpg +opening_circ 7 percentile: [mask],0<=_min_percentile[%]<=100,0<=_max_percentile[%]<=100. . : 'min_percentile=0' 'max_percentile=100'. : [#1] image.jpg shape_circle 11,11 +percentile[0] [1],25,75 peronamalik_flow: K_factor>0,_nb_iter>=0,_dt,_keep_sequence={ 0:No | 1:Yes } - (Perona-Malik) . : 'K_factor=20' 'nb_iter=5' 'dt=5' 'keep_sequence=0'. : [#1] image.jpg +heat_flow 20 phase_correlation: [destination] . : [#1] image.jpg +shift -30,-20 +phase_correlation[0] [1] unroll[-1] y pde_flow: _nb_iter>=0,_dt,_velocity_command,_keep_sequence={ 0:No | 1:Yes } PDE . : 'nb_iter=10' 'dt=30' 'velocity_command=laplacian' 'keep_sequence=0'. : [#1] image.jpg +pde_flow 20 periodize_poisson: . : [#1] image.jpg +periodize_poisson array 2,2,2 rbf: dx,_x0,_x1,_phi(r),_is_affine_term={ 0:No | 1:Yes } | dx,dy,_x0,_y0,_x1,_y1,_phi(r),_is_affine_term | dx,dy,dz,x0,y0,z0,x1,y1,z1,phi(r)_is_affine_term / RBF. . : - : [ x_k, f1(x_k),...fN(x_k) ]. - : [ x_k,y_k, f1(x_k,y_k),...,fN(x_k,y_k) ]. - : [ x_k,y_k,z_k, f1(x_k,y_k,z_k),...,fN(x_k,y_k,z_k) ]. 'x_k' 'y_k' 'z_k' 'k' . 'f1(),..,fN()' 'N' 'k' . 'dx'x'dy'x'dz' 'N' . 'affine_term==1' . : 'x0=y0=z0=0' 'x1=dx-1' 'y1=dy-1' 'z1=dz-1' 'phi(r)=r*log(1+r)' 'affine_term=0'. : [#1] sample colorful,400 100%,100% noise_poissondisk. 10 1,{is},1,5 eval[-2] "begin(p=0);i?(I[#-1,p++]=[x,y,I(#0)])" to_rgb[1] mul[0,1] dilate_circ[0] 5 +rbf[-1] {0,[w,h]} c[-1] 0,255 [#2] 32,1,1,5,u([400,400,255,255,255]) rbf 400,400 c 0,255 red_eye: 0<=_threshold<=100,_smoothness>=0,0<=attenuation<=1 . : 'threshold=75' 'smoothness=3.5' 'attenuation=0.1'. : [#1] image.jpg +red_eye , remove_hotpixels: _mask_size>0, _threshold[%]>0 . : 'mask_size=3' 'threshold=10%'. : [#1] image.jpg noise 10,2 +remove_hotpixels , remove_pixels: number_of_pixels[%]>=0 ( ) . : [#1] image.jpg +remove_pixels 50% rolling_guidance: std_deviation_s[%]>=0,std_deviation_r[%]>=0,_precision>=0 (rolling guidance) . : "Rolling Guidance Filter", Qi Zhang Xiaoyong, Shen Li, Xu Jiaya Jia, ECCV'2014. : 'std_deviation_s=4' 'std_deviation_r=10' 'precision=0.5'. : [#1] image.jpg +rolling_guidance , +- sharpen: amplitude>=0 | amplitude>=0,edge>=0,_alpha[%],_sigma[%] (shock filters). shock-filter 'edge' . : 'edge=0' 'alpha=0' 'sigma=0'. : [#1] image.jpg sharpen 300 [#2] image.jpg blur 5 sharpen 300,1 sharpen_alpha: _amplitude[%]>=0,_nb_scales>0,0<=_anisotropy<=1,0<=_minimize_alpha<=1 (alpha boosting). : 'amplitude=1' 'nb_scales=5' 'anisotropy=0' 'minimize_alpha=1'. smooth (+): amplitude[%]>=0,_sharpness>=0,0<=_anisotropy<=1,_alpha[%],_sigma[%],_dl>0,_da>0,_precision>0,_interpolation,_fast_approx={ 0:No | 1:Yes } | nb_iterations>=0,_sharpness>=0,_anisotropy,_alpha,_sigma,_dt>0,0 | [tensor_field],_amplitude>=0,_dl>0,_da>0,_precision>0,_interpolation,_fast_approx={ 0:No | 1:Yes } | [tensor_field],_nb_iters>=0,_dt>0,0 PDE . 'interpolation' { 0:Nearest | 1:Linear | 2:Runge-kutta } . : 'sharpness=0.7' 'anisotropy=0.3' 'alpha=0.6' 'sigma=1.1' 'dl=0.8' 'da=30' 'precision=2' 'interpolation=0' 'fast_approx=1'. : [#1] image.jpg repeat 3 smooth 40,0,1,1,2 done [#2] image.jpg 100%,100%,1,2 rand[-1] -100,100 repeat 2 smooth[-1] 100,0.2,1,4,4 done warp[0] [-1],1,1,1 : https://gmic.eu/oldtutorial/_smooth split_freq: smoothness[%]>0 . : [#1] image.jpg split_freq 2% solve_poisson: "laplacian_command",_nb_iterations>=0,_time_step>0,_nb_scales>=0 'laplacian[n]' 'laplacian_command[n]' . . 'nb_scales=0' . : 'nb_iterations=60' 'dt=5' 'nb_scales=0'. : [#1] image.jpg command "foo : gradient x" +solve_poisson foo +foo[0] +laplacian[1] split_alpha: _nb_scales[%]={ 0:Auto | -S<0 | N>0 },_subsample={ 0:No | 1:Yes },0<=_anisotropy<=1,0<=_minimize_alpha<=1 . 'nb_scales==-S' 'SxS' . 'anisotropy' 'subsample=0' . merge_alpha . : 'nb_scales=0' 'subsample=0' 'anisotropy=0' 'minimize_alpha=1'. split_details: _nb_scales[%]={ 0:Auto | -S<0 | N>0 },_base_scale[%]>=0,_detail_scale[%]>=0 'nb_scales' . 'base_scale' = 'detail_scale' = 0 'a trous' . . : 'nb_scales=0' 'base_scale=0' 'detail_scale=0'. : [#1] image.jpg split_details , structuretensors: _scheme={ 0:Centered | 1:Forward/backward } . : 'scheme=0'. : [#1] image.jpg structuretensors abs pow 0.2 : https://gmic.eu/oldtutorial/_structuretensors solidify: _smoothness[%]>=0,_diffusion_type={ 0:Isotropic | 1:Delaunay- guided | 2:Edge-oriented },_diffusion_iter>=0 . : 'smoothness=75%' 'diffusion_type=1' 'diffusion_iter=20'. : [#1] image.jpg 100%,100% circle[-1] 50%,50%,25%,1,255 append c +solidify , display_rgba syntexturize: _width[%]>0,_height[%]>0 'width'x'height' . : http://www.ipol.im/pub/art/2011/ggm_rpn. : 'width=height=100%'. : [#1] image.jpg crop 2,282,50,328 +syntexturize 320,320 syntexturize_matchpatch: _width[%]>0,_height[%]>0,_nb_scales>=0,_patch_size>0,_blending_size>=0,_precision>=0 'width'x'height' (patch-matching). 'nbscales==0' . : 'width=height=100%' 'nb_scales=0' 'patch_size=7' 'blending_size=5' 'precision=1'. : [#1] image.jpg crop 25%,25%,75%,75% syntexturize_matchpatch 512,512 tv_flow: _nb_iter>=0,_dt,_keep_sequence={ 0:No | 1:Yes } (total variation flow) . : 'nb_iter=10' 'dt=30' 'keep_sequence=0'. : [#1] image.jpg +tv_flow 40 unsharp: radius[%]>=0,_amount>=0,_threshold[%]>=0 (unsharp mask) . : 'amount=2' 'threshold=0'. : [#1] image.jpg blur 3 +unsharp 1.5,15 cut 0,255 unsharp_octave: _nb_scales>0,_radius[%]>=0,_amount>=0,threshold[%]>=0 . : 'nb_scales=4' 'radius=1' 'amount=2' 'threshold=0'. : [#1] image.jpg blur 3 +unsharp_octave 4,5,15 cut 0,255 vanvliet (+): std_deviation[%]>=0,order={ 0 | 1 | 2 | 3 },axis={ x | y | z | c },_boundary_conditions Vanvliet . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=1'. : [#1] image.jpg +vanvliet 3,1,x [#2] image.jpg +vanvliet 30,0,x vanvliet[-2] 30,0,y add voronoi: (Voronoi) . : [#1] 400,400,1,3 eval "repeat(50,I(v([w,w]-1)) = v([255,255,255]))" +voronoi +gradient_norm. eq. 0 *[-2,-1] watermark_fourier: text,_size>0 . : 'size=33'. : [#1] image.jpg +watermark_fourier "Watermarked!" +display_fft remove[-3,-1] normalize 0,255 append[-4,-2] y append[-2,-1] y watershed (+): [priority_image],_is_high_connectivity={ 0:No | 1:Yes } (watershed transform) . : 'is_high_connectivity=1'. : [#1] 400,400 noise 0.2,2 eq 1 +distance 1 mul[-1] -1 label[-2] watershed[-2] [-1] mod[-2] 256 map[-2] 0 reverse 11.9. (Features Extraction) ------------------------------------ area: tolerance>=0,is_high_connectivity={ 0:No | 1:Yes } . : 'is_high_connectivity=0'. : [#1] image.jpg luminance stencil[-1] 1 +area 0 : https://gmic.eu/oldtutorial/_area area_fg: tolerance>=0,is_high_connectivity={ 0:No | 1:Yes } . 'area' . : 'is_high_connectivity=0'. : [#1] image.jpg luminance stencil[-1] 1 +area_fg 0 at_curve: x0[%],y0[%],z0[%],...,xN[%],yn[%],zn[%] . : [#1] image.jpg +at_curve 0,0,0,80%,50%,0,100%,100%,0 at_quadrangle: x0[%],y0[%],x1[%],y1[%],x2[%],y2[%],x3[%],y3[%],_interpolation,_boundary_conditions | x0[%],y0[%],z0[%],x1[%],y1[%],z1[%],x2[%],y2[%],z2[%],x3[%],y3[%],z3[%],_interpolation,_boundary_conditions . 'interpolation' { 0:Nearest-neighbor | 1:Linear | 2:Cubic } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : [#1] image.jpg params=5%,5%,95%,5%,60%,95%,40%,95% +at_quadrangle $params polygon.. 4,$params,0.5,255 barycenter: (barycenter) .: [#1] 256,256 ellipse 50%,50%,20%,20%,0,1,1 deform 20 +barycenter +ellipse[-2] {@0,1},5,5,0,10 betti: B0 B1 B2 . B0 B1 B2 (status) . B0,B1,B2 . ( 'https://en.wikipedia.org/wiki/Betti_number' ). canny: _sigma[%]>=0,_low_threshold>=0,_high_threshold>=0 (Canny). : 'sigma=1' 'low_threshold=0.05' 'high_threshold=0.15'. : [#1] image.jpg canny 1 delaunay: _output_type={ 0:Image | 1:Coordinates/triangles } (Delaunay) . . (a,b,c) 'ABC' 'a' 'b' 'c' 'A' 'B' 'C' . : [#1] 400,400 rand 32,255 100%,100% noise. 0.4,2 eq. 1 mul +delaunay [#2] image.jpg 100%,100% noise. 2,2 eq. 1 delaunay. +blend shapeaverage0 detect_skin: 0<=tolerance<=1,_skin_x,_skin_y,_skin_radius>=0 . (chromaticity) CbCr . 'skin_x' 'skin_y' 'skin_radius' ('skin_x','skin_y') 'skin_radius' . : 'tolerance=0.5' 'skin_x=skin_y=radius=-1'. displacement (+): [reference],_smoothness,_precision>=0,_nb_scales>=0,_iteration_max>=0,mode={ 0:Backward | 1:Forward },_[guide] () (). 'smoothness>=0' (Tikhonov) TV ( ) . 'nbscales==0' . : 'smoothness=0.1' 'precision=7' 'nb_scales=0' 'iteration_max=1000' 'mode=0' '[guide]=(unused)'. : [#1] image.jpg +rotate 3,1,0,50%,50% +displacement[-1] [-2] quiver[-1] [-1],15,1,1,1,{1.5*iM} distance (+): isovalue[%],_metric | isovalue[%],[metric],_method (isovalue) . 'metric' { 0:Chebyshev | 1:Manhattan | 2:Euclidean | 3:Squared-euclidean } . 'method' { 0:Fast-marching | 1:Low- connectivity dijkstra | 2:High-connectivity dijkstra | 3:1+Return path | 4:2+Return path } . : 'metric=2' 'method=0'. : [#1] image.jpg threshold 20% distance 0 pow 0.3 [#2] 400,400 set 1,50%,50% +distance[0] 1,2 +distance[0] 1,1 distance[0] 1,0 mod 32 threshold 16 append c : https://gmic.eu/oldtutorial/_distance edgels: x0,y0,_n0,_is_high_connectivity={ 0:No | 1:Yes } edgel ( ) . ( '!=-1') 'x0,y0,n0' edgel . * 'x0,y0' 'n0' edgel . * 'x0,y0' ( 'n0=-1' ) edgel (x0,y0) . * ( 'x0=y0=n0=-1' ) edgel . edgel '[x,y,n]' 'x' 'y' edgel 'n' ( { 0:[1,0] | 1:[0,1] | 2:[-1,0] | 3:[0,-1] } ). : 'x0=y0=n0=-1' 'is_high_connectivity=1'. edges: _threshold[%]>=0 () . : 'edges=15%' : [#1] image.jpg +edges 15% fftpolar: / . : [#1] image.jpg fftpolar ellipse 50%,50%,10,10,0,1,0 ifftpolar histogram (+): nb_levels[%]>0,_min_value[%],_max_value[%] . . 'min_value' 'max_value' . : 'min_value=0%' 'max_value=100%'. : [#1] image.jpg +histogram 64 display_graph[-1] 400,300,3 histogram_masked: [mask],nb_levels[%]>0,_min_value[%],_max_value[%] . : 'min_value=0%' 'max_value=100%'. histogram_nd: nb_levels[%]>0,_value0[%],_value1[%] ( ). . : 'value0=0%' 'value1=100%'. : [#1] image.jpg channels 0,1 +histogram_nd 256 histogram_cumul: _nb_levels>0,_is_normalized={ 0:No | 1:Yes },_val0[%],_val1[%] . : 'nb_levels=256' 'is_normalized=0' 'val0=0%' 'val1=100%'. : [#1] image.jpg +histogram_cumul 256 histogram[0] 256 display_graph 400,300,3 histogram_pointwise: nb_levels[%]>0,_value0[%],_value1[%] . . : 'value0=0%' 'value1=100%'. hough: _width>0,_height>0,gradient_norm_voting={ 0:No | 1:Yes } (theta,rho) . : 'width=512' 'height=width' 'gradient_norm_voting=1'. : [#1] image.jpg +blur 1.5 hough[-1] 400,400 blur[-1] 0.5 add[-1] 1 log[-1] huffman_tree: . 1xN 'N' / '[ value,parent,child0,child1 ]' . . . (status) . : compress_huffman decompress_huffman. ifftpolar: /. img2patches: patch_size>0,_overlap[%]>0,_boundary_conditions ( ) z. 'overlap' '[0,patch_size-1]' . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'overlap=0' 'boundary_conditions=0'. : patches2img. : [#1] image.jpg img2patches 64 isophotes: _nb_levels>0 () . : 'nb_levels=64' : [#1] image.jpg blur 2 isophotes 6 dilate_circ 5 display_rgba label (+): _tolerance>=0,is_high_connectivity={ 0:No | 1:Yes },_is_L2_norm={ 0:No | 1:Yes } . 'is_L2_norm=1' L2 L1 . : 'tolerance=0' 'is_high_connectivity=0' 'is_L2_norm=1'. : [#1] image.jpg luminance threshold 60% label normalize 0,255 map 0 [#2] 400,400 set 1,50%,50% distance 1 mod 16 threshold 8 label mod 255 map 2 : https://gmic.eu/oldtutorial/_label label_fg: tolerance>=0,is_high_connectivity={ 0:No | 1:Yes },_is_L2_norm={ 0:No | 1:Yes } () . 'label' . 'is_L2_norm=1' L2 L1 . : 'is_high_connectivity=0' 'is_L2_norm=1'. laar: . x0,y0,x1,y1 . : [#1] shape_cupid 256 coords=${-laar} normalize 0,255 to_rgb rectangle $coords,0.5,0,128,0 max_patch: _patch_size>=1 . : 'patch_size=16'. : [#1] image.jpg norm +max_patch 16 min_patch: _patch_size>=1 . : 'patch_size=16'. : [#1] image.jpg norm +min_patch 16 minimal_path: x0[%]>=0,y0[%]>=0,z0[%]>=0,x1[%]>=0,y1[%]>=0,z1[%]>=0,_is_high_connectivity={ 0:No | 1:Yes } (minimal path) . : 'is_high_connectivity=0'. : [#1] image.jpg +gradient_norm fill[-1] 1/(1+i) minimal_path[-1] 0,0,0,100%,100%,0 pointcloud[-1] 0 *[-1] 280 to_rgb[-1] ri[-1] [-2],0 or mse: [reference] MSE ( Mean-Squared Error) . . (status) . mse_matrix: MSE ( ) . : [#1] image.jpg +noise 30 +noise[0] 35 +noise[0] 38 cut. 0,255 +mse_matrix patches2img: width>0,height>0,_overlap[%]>0,_overlap_std[%] (2D) (patch) . 'overlap' '[0,patch_size-1]' 'patch_size' / . 'overlap_std' . 'overlap_std' '-1' (uniform) . : 'overlap=0' 'overlap_std=-1'. : img2patches. : [#1] image.jpg +img2patches 32,0,3 mirror[-1] xy patches2img[-1] {0,[w,h]} patches: patch_width>0,patch_height>0,patch_depth>0,x0,y0,z0,_x1,_y1,_z1,...,_xN,_yN,_zN N+1 (patch) . : [#1] image.jpg +patches 64,64,1,153,124,0,184,240,0,217,126,0,275,38,0 pca: _output_mode,_target_dim[%]>0,_normalization_mode={ 0:None | 1:Center | 2:Center+scale } PCA ( Principal Component Analysis) 'Xk' . 'output_mode' : * '1': 'Yk = Mt*(Xk - avg)/std' (projection) 'Xk' () 'target_dim' . 'avg' 'Xk' ( 'normalization_mode==0'). 'std' 'Xk' ( 'normalization_mode<2'). 'Mt' 'M' 'target_dim' ( ) 'Xk'. * '2': 'avg': 'Xk'. * '4': 'std': 'Xk'. * '8': 'M': ( / orthonormal). 'avg' 'std' 'M' 'Xk = avg + std*M*Yk' () 'Yk' (retro-project) . : 'output_mode=15' 'target_dim=100%' 'normalization_mode=1'. : [#1] shape_dragonfly 400 mul 128 0 eval.. "i?da_push([x,y])" da_freeze. pca. 11,2 eval "C = I[#-2,0]; M = transpose(crop(#-1),2); repeat(2,k, polygon(#0,-2,C-1000*M[2*k,2],C+1000*M[2*k,2],1,0xF0F0F0F0,180)); ellipse(#0,C,5,5,0,1,255)" k[0] matchpatch (+): [patch_image],patch_width>=1,_patch_height>=1,_patch_depth>=1,_nb_iterations>=0,_nb_randoms>=0,_occurence_penalization,_output_score={ 0:No | 1:Yes },_[guide] (correspondence map) (patch-matching). (p,q) . 'output_score=1' . 'patch_penalization' SSD . 'patch_penalization' '-patch_penalization' SSD (inf-penalized). : 'patch_height=patch_width' 'patch_depth=1' 'nb_iterations=5' 'nb_randoms=5' 'occurence_penalization=0' 'output_score=0' 'guide=(undefined)'. : [#1] image.jpg sample colorful +matchpatch[0] [1],3 +warp[-2] [-1],0 matchpatch_alt: [patch_image],_patch_width>=1,_patch_height>=1,_patch_depth>=1,_nb_iterations>=0,_nb_randoms>=0,_occurrence_penalization>=0,_output_score={ 0:No | 1:Yes },_[guide] matchpatch (). : 'patch_height=patch_width' 'patch_depth=1' 'nb_iterations=5' 'nb_randoms=5' 'occurrence_penalization=0' 'output_score=0' 'guide=(undefined)'. : [#1] image.jpg sample colorful +matchpatch_alt[0] [1],3 +warp[-2] [-1],0 plot2value: (2D graph plots) . : [#1] 400,300,1,1,'y>300*abs(cos(x/10+2*u))' +plot2value +display_graph[-1] 400,300 pointcloud: _type = { -X:-X-opacity | 0:Binary | 1:Cumulative | 2:Label | 3:Retrieve coordinates },_width,_height>0,_depth>0 (point cloud) 1D/2D 3D ( ). NxMx1x1 Nx1x1xM 1xNx1xM 'N' M . 'M'>3 M (M-3)- . 'width' 'height' 'depth' : - . - N>0 N . - N<0 N . ('width' 'height' 'depth') . : 'type=0' 'max_width=max_height=max_depth=0'. : [#1] 3000,2 rand 0,400 +pointcloud 0 dilate[-1] 3 [#2] 3000,2 rand 0,400 {w} {w},3 rand[-1] 0,255 append y +pointcloud 0 dilate[-1] 3 psnr: [reference],_max_value>0 PSNR ( Peak Signal-to-Noise Ratio) . . (status) . : 'max_value=255'. psnr_matrix: _max_value>0 PSNR ( ) . : 'max_value=255'. : [#1] image.jpg +noise 30 +noise[0] 35 +noise[0] 38 cut. 0,255 +psnr_matrix segment_watershed: _threshold>=0 (watershed segmentation) . : 'threshold=2'. : [#1] image.jpg segment_watershed 2 shape2bump: _resolution>=0,0<=_weight_std_max_avg<=1,_dilation,_smoothness>=0 (bumpmap) . : 'resolution=256' 'weight_std_max=0.75' 'dilation=0' 'smoothness=100'. skeleton: _boundary_conditions={ 0:Dirichlet | 1:Neumann } (skeleton) (constrained thinning). : 'boundary_conditions=1'. : [#1] shape_cupid 320 +skeleton 0 slic: size>0,_regularity>=0,_nb_iterations>0 (2D) SLIC ( Simple Linear Iterative Clustering). . : Achanta, R., Shaji, A., Smith, K., Lucchi, A., Fua, P., & Susstrunk, S. (2010). SLIC Superpixels (No. EPFL-REPORT-149300). : 'size=16' 'regularity=10' 'nb_iterations=10'. : [#1] image.jpg +srgb2lab slic[-1] 16 +blend shapeaverage f[-2] "j(1,0)==i && j(0,1)==i" *[-1] [-2] ssd_patch: [patch],_use_fourier={ 0:No | 1:Yes },_boundary_conditions SSD (patch) . 'boundary_conditions' 'use_fourier=0' . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'use_fourier=0' 'boundary_conditions=0'. : [#1] image.jpg +crop 20%,20%,35%,35% +ssd_patch[0] [1],0,0 ssim: [reference],_patch_size>0,_max_value>0 (SSIM Structural Similarity Index Measure) . (status) . 'downsampling_factor' '%' '1+(patch_size-1)*spatial_factor%' . SSIM : Wang, Zhou, et al., "Image quality assessment: from error visibility to structural similarity.", in IEEE transactions on image processing 13.4 (2004): 600-612. ( Matlab) : https://ece.uwaterloo.ca/~z70wang/research/ssim : 'patch_size=11' 'max_value=255'. ssim_matrix: _patch_size>0,_max_value>0 SSIM ( ) . : 'patch_size=11' 'max_value=255'. : [#1] image.jpg +noise 30 +noise[0] 35 +noise[0] 38 cut. 0,255 +ssim_matrix thinning: _boundary_conditions={ 0:Dirichlet | 1:Neumann } (morphological thinning) ( ) : 'boundary_conditions=1'. : [#1] shape_cupid 320 +thinning tones: N>0 N (tones masks) . : [#1] image.jpg +tones 3 topographic_map: _nb_levels>0,_smoothness (topographic maps). : 'nb_levels=16' 'smoothness=2'. : [#1] image.jpg topographic_map 10 tsp: _precision>=0 <> ( ) 2-opt. Nx1x1xC N C- . x . : 'precision=256'. : [#1] 256,1,1,2 rand 0,512 tsp , 512,512,1,3 repeat w#0 circle[-1] {0,I[$>]},2,1,255,255,255 line[-1] {0,boundary=2;[I[$>],I[$>+1]]},1,255,128,0 done keep[-1] variance_patch: _patch_size>=1 (x,y) . : 'patch_size=16' : [#1] image.jpg +variance_patch 11.10. (Image Drawing) ------------- arrow: x0[%],y0[%],x1[%],y1[%],_thickness[%]>=0,_head_length[%]>=0,_head_thickness[%]>=0,_opacity,_pattern,_color1,... . <> <<0x>> . / . : 'thickness=1%' 'head_length=10%' 'head_thickness=3%' 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] 400,400,1,3 repeat 100 arrow 50%,50%,{u(100)}%,{u(100)}%,3,20,10,0.3,${-rgb} done axes: x0,x1,y0,y1,_font_height>=0,_opacity,_pattern,_color1,... xy . <> <<0x>> . x Y <> <> Y . y X <> <> X . : 'font_height=14' 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] 400,400,1,3,255 axes -1,1,1,-1 ball: _size>0,_R,_G,_B,_ambient>=0,_diffuse>=0,_specular>=0,_shininess>=0,_light_x,_light_y,_light_z RGBA (Phong). : 'size=64' 'R=200' 'G=R' 'B=R' 'ambient=0.25' 'diffuse=1' 'specular=1' 'shininess=20' 'light_x=1.5' 'light_y=-1.5' 'light_z=1'. : [#1] repeat 9 { ball {int(1.5^($>+4))},${-rgb} } append_tiles 3,3 chessboard: size1>0,_size2>0,_offset1,_offset2,_angle,_opacity,_color1,...,_color2,... . : 'size2=size1' 'offset1=offset2=0' 'angle=0' 'opacity=1' 'color1=0' 'color2=255'. : [#1] image.jpg chessboard 32,32,0,0,25,0.3,255,128,0,0,128,255 cie1931: CIE-1931 . : [#1] 500,400,1,3 cie1931 circle: x[%],y[%],R[%],_opacity,_pattern,_color1,... . <<100%>> <> . <> <<0x>> . / . : 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] image.jpg repeat 300 circle {u(100)}%,{u(100)}%,{u(30)},0.3,${-rgb} done circle 50%,50%,100,0.7,255 close_binary: 0<=_endpoint_rate<=100,_endpoint_connectivity>=0,_spline_distmax>=0,_segment_distmax>=0,0<=_spline_anglemax<=180,_spline_roundness>=0,_area_min>=0, _allow_self_intersection={ 0:No | 1:Yes } ( ). : 'endpoint_rate=75' 'endpoint_connectivity=2' 'spline_distmax=80' 'segment_distmax=20' 'spline_anglemax=90' 'spline_roundness=1' 'area_min=100' 'allow_self_intersection=1'. curve: [xy_coordinates],_thickness>0,_tilt,_tilt_strength[%],_is_closed={ 0:No | 1:Yes },_opacity,_color1,... . : * <<[xy_coordinates]>> XY - . * <> . * <> . * <> [0,1] ( [0,100] ). * <> . : 'thickness=0' 'tilt=45' : [#1] image.jpg srand 3 16,1,1,4,u s. c,2 rbf[-2,-1] 1000,0,1 n[-2] 10,{w#0-10} n[-1] 10,{h#0-10} a[-2,-1] c curve[-2] [-1],6,0,0,0,1,0,128,0 ellipse (+): x[%],y[%],R[%],r[%],_angle,_opacity,_pattern,_color1,... . <<100%>> <> . <> <<0x>> . / . : 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] image.jpg repeat 300 ellipse {u(100)}%,{u(100)}%,{u(30)},{u(30)},{u(180)},0.3,${-rgb} done ellipse 50%,50%,100,100,0,0.7,255 flood (+): x[%],_y[%],_z[%],_tolerance>=0,_is_high_connectivity={ 0:No | 1:Yes },_opacity,_color1,... (Flood-fill) . : 'y=z=0' 'tolerance=0' 'is_high_connectivity=0' 'opacity=1' 'color1=0'. : [#1] image.jpg repeat 1000 flood {u(100)}%,{u(100)}%,0,20,0,1,${-rgb} done gaussian: _sigma1[%],_sigma2[%],_angle . : 'sigma1=3' 'sigma2=sigma1' 'angle=0'. : [#1] 400,400 gaussian 100,30,45 : https://gmic.eu/oldtutorial/_gaussian graph: [function_image],_plot_type,_vertex_type,_ytop,_ybottom,_opacity,_pattern,_color1,... . <> { 0:None | 1:Lines | 2:Splines | 3:Bar } . <> { 0:None | 1:Points | 2,3:Crosses | 4,5:Circles | 6,7:Squares } . <> <<0x>> . : 'plot_type=1' 'vertex_type=1' 'ytop=ybottom=0 (auto)' 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] image.jpg +rows 50% blur[-1] 3 split[-1] c div[0] 1.5 graph[0] [1],2,0,0,0,1,255,0,0 graph[0] [2],2,0,0,0,1,0,255,0 graph[0] [3],2,0,0,0,1,0, 0,255 keep[0] grid: size_x[%]>=0,size_y[%]>=0,_offset_x[%],_offset_y[%],_opacity,_pattern,_color1,... xy . <> <<0x>> . : 'offset_x=offset_y=0' 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] image.jpg grid 10%,10%,0,0,0.5,255 [#2] 400,400,1,3,255 grid 10%,10%,0,0,0.3,0xCCCCCCCC,128,32,16 j (+): <>. image (+): [sprite],_x[%|~],_y[%|~],_z[%|~],_c[%|~],_opacity,_[opacity_mask],_max_opacity_mask . ( <>). x y z c <<~>> ( [0,1]) . { 0:left-justified | 0.5:centered | 1:right-justified }. : 'x=y=z=c=0' 'opacity=1' 'opacity_mask=(undefined)' 'max_opacity_mask=1'. : [#1] image.jpg +crop 40%,40%,60%,60% resize[-1] 200%,200%,1,3,5 frame[-1] xy,2,0 image[0] [-1],30%,30% keep[0] ja: <>. imagealpha: [sprite],_x[%|~],_y[%|~],_z[%|~],_c[%|~],_opacity . ( <>). x y z c <<~>> ( [0,1]) . { 0:left-justified | 0.5:centered | 1:right-justified }. : 'x=y=z=c=0' 'opacity=1'. line (+): x0[%],y0[%],x1[%],y1[%],_opacity,_pattern,_color1,... . <> <<0x>> . : 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] image.jpg repeat 500 line 50%,50%,{u(w)},{u(h)},0.5,${-rgb} done line 0,0,100%,100%,1,0xCCCCCCCC,255 line 100%,0,0,100%,1,0xCCCCCCCC,255 line_aa: x0[%],y0[%],x1[%],y1[%],_opacity,_color1,... (antialiased) . : 'opacity=1' 'color1=0'. : [#1] 512,512,1,3 repeat 100 line_aa {v([w,h,w,h])-1},1,${-rgb} done spline: x0[%],y0[%],u0[%],v0[%],x1[%],y1[%],u1[%],v1[%],_opacity,_color1,... ( ). : 'opacity=1' 'color1=0'. : [#1] image.jpg repeat 30 { spline {u(100)}%,{u(100)}%,{u(-600,600)},{u(-600,600)},{u(100)}%,{u(100)}%,{u(-600,600)},{u(-600,600)},1,${-rgb} } thickcircle: x[%],y[%],R[%],_thickness>=0,_opacity,_color1,... . : 'thickness=3' 'opacity=1' 'color1=0'. : [#1] 400,400 repeat 15 { R:=lerp(10,190,$%) thickcircle 200,200,$R,2,1,$R } n 0,255 map 7 thickellipse: x[%],y[%],R[%],r[%],_angle,_thickness>=0,_opacity,_color1,... . : 'thickness=3' 'opacity=1' 'color1=0'. : [#1] image.jpg repeat 300 thickellipse {u(100)}%,{u(100)}%,{u(50)},{u(50)},{u(180)},3,0.6,${-rgb} done thickellipse 50%,50%,200,100,0,5,0.7,255 thickline: x0[%],y0[%],x1[%],y1[%],_thickness,_opacity,_color1 . : 'thickness=2' 'opacity=1' 'color1=0'. : [#1] 400,400,1,3 repeat 100 thickline {u([w,h,w,h,5])},0.5,${-rgb} done thickpolygon: N>=1,x1[%],y1[%],...,xN[%],yN[%],_thickness>=0,_opacity,_color1,... | [coords],_thickness>=0,_opacity,_color1,... N- . 'thickness<0' . : 'thickness=3' 'opacity=1' 'color1=0'. : [#1] image.jpg thickpolygon 4,20%,20%,80%,30%,80%,70%,20%,80%,5,1,0,255,0 [#2] image.jpg 2,16,1,1,'u(x?h#0:w#0)' thickpolygon[-2] [-1],5,1,255,0,255 remove[-1] thickspline: x0[%],y0[%],u0[%],v0[%],x1[%],y1[%],u1[%],v1[%],_thickness,_opacity,_color1,... ( ). : 'thickness=3' 'opacity=1' 'color1=0'. : [#1] image.jpg repeat 30 { thickspline {u(100)}%,{u(100)}%,{u(-600,600)},{u(-600,600)},{u(100)}%,{u(100)}%,{u(-600,600)},{u(-600,600)},3,1, ${-rgb} } mandelbrot: z0r,z0i,z1r,z1i,_iteration_max>=0,_is_julia={ 0:No | 1:Yes },_c0r,_c0i,_opacity / . : 'iteration_max=100' 'is_julia=0' 'c0r=c0i=0' 'opacity=1'. : [#1] 400,400 mandelbrot -2.5,-2,2,2,1024 map 0 +blur 2 elevation3d[-1] -0.2 marble: _image_weight,_pattern_weight,_angle,_amplitude,_sharpness>=0,_anisotropy>=0,_alpha,_sigma,_cut_low>=0,_cut_high>=0 . : 'image_weight=0.2' 'pattern_weight=0.1' 'angle=45' 'amplitude=0' 'sharpness=0.4' 'anisotropy=0.8' 'alpha=0.6' 'sigma=1.1' 'cut_low=cut_high=0'. : [#1] image.jpg +marble , maze: _width>0,_height>0,_cell_size>0 . : [#1] maze 30,20 negate normalize 0,255 maze_mask: _cellsize>0 . . : [#1] 0 text "G'MIC",0,0,53,1,1 dilate 3 autocrop 0 frame xy,1,0 maze_mask 8 dilate 3 negate mul 255 newton_fractal: z0r,z0i,z1r,z1i,_angle,0<=_descent_method<=2,_iteration_max>=0,_convergence_precision>0,_expr_p(z),_expr_dp(z),_expr_d2p(z) (z0r,z0i) - (z1r,z1i). [ last_zr, last_zi, nb_iter_used_for_convergence ] . 'descent_method' { 0:Secant | 1:Newton | 2:Householder } . : 'angle=0' 'descent_method=1' 'iteration_max=200' 'convergence_precision=0.01' 'expr_p(z)=z^^3-1' 'expr_dp(z)=3*z^^2' 'expr_d2z(z)=6*z'. : [#1] 400,400 newton_fractal -1.5,-1.5,1.5,1.5,0,2,200,0.01,"z^^6 + z^^3 - 1","6*z^^5 + 3*z^^2","30*z^^4 + 6*z" f "[ atan2(i1,i0)*90+20,1, cut(i2/30,0.2,0.7) ]" hsl2rgb pack_sprites: [sprite_set],_nb_scales>=1,0<_min_scale<=100,_allow_rotation={ 0:None | 1:180 deg. | 2:90 deg. | 3:Any },_spacing,_max_attempts>0 <<>> . . . . '[sprite_set]' . . . 'nb_scales' . 'min_scale' ( %) ( ). 'spacing' . 'max_attempts' . : 'nb_scales=1' 'min_scale=25' 'allow_rotation=0' 'spacing=1' 'max_attempts=512'. : [#1] shape_heart 512 negate normalize 0,255 channels -3,0 repeat 2 { ball 48,${-rgb} } +pack_sprites[0] [^0],5,15 piechart: label_height>=0,label_R,label_G,label_B,"label1",value1,R1,G1,B1,...,"labelN",valueN,RN,GN,BN (RGB) . : [#1] image.jpg piechart 25,0,0,0,"Red",55,255,0,0,"Green",40,0,255,0,"Blue",30,128,128,255,"Other",5,128,128,128 plasma: _alpha,_beta,_scale>=0 . <> . : 'alpha=1' 'beta=1' 'scale=8'. : [#1] 400,400,1,3 plasma 1 : https://gmic.eu/oldtutorial/_plasma point (+): x[%],_y[%],_z[%],_opacity,_color1,... . : 'z=0' 'opacity=1' 'color1=0'. : [#1] image.jpg repeat 10000 point {u(100)}%,{u(100)}%,0,1,${-rgb} done polka_dots: diameter>=0,_density,_offset1,_offset2,_angle,_aliasing,_shading,_opacity,_color,... . : 'density=20' 'offset1=offset2=50' 'angle=0' 'aliasing=10' 'shading=1' 'opacity=1' 'color=255'. : [#1] image.jpg polka_dots 10,15,0,0,20,10,1,0.5,0,128,255 polygon (+): N>=1,x1[%],y1[%],...,xN[%],yN[%],_opacity,_pattern,_color1,... | [coords],_opacity,_pattern,_color1,... N- . 'pattern' '0x' . . '-' 'pattern' . : 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] image.jpg polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,0.3,0,255,0 polygon 4,20%,20%,80%,30%,80%,70%,20%,80%,1,0xCCCCCCCC,255 [#2] image.jpg 2,16,1,1,'u(x?h#0:w#0)' polygon[-2] [-1],0.6,255,0,255 remove[-1] quiver: [function_image],_sampling[%]>0,_factor>=0,_is_arrow={ 0:No | 1:Yes },_opacity,_color1,... / . : 'sampling=5%' 'factor=1' 'is_arrow=1' 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] 100,100,1,2,'!c?x-w/2:y-h/2' 500,500,1,3,255 quiver[-1] [-2],10 [#2] image.jpg +rescale2d ,600 luminance[0] gradient[0] mul[1] -1 reverse[0,1] append[0,1] c blur[0] 8 orientation[0] quiver[1] [0],20,1,1,0.8,255 rectangle: x0[%],y0[%],x1[%],y1[%],_opacity,_pattern,_color1,... . 'pattern' '0x' . . : 'opacity=1' 'pattern=(undefined)' 'color1=0'. : [#1] image.jpg repeat 30 { rectangle {u(100)}%,{u(100)}%,{u(100)}%,{u(100)}%,0.3,${-rgb} } rorschach: 'smoothness[%]>=0','mirroring={ 0:None | 1:X | 2:Y | 3:XY } . : 'smoothness=5%' 'mirroring=1'. : [#1] 400,400 rorschach 3% sierpinski: recursion_level>=0 . : 'recursion_level=7'. : [#1] image.jpg sierpinski 7 spiralbw: width>0,_height>0,_is_2dcoords={ 0:No | 1:Yes } . : 'height=width' 'is_2dcoords=0'. : [#1] spiralbw 16 [#2] image.jpg spiralbw {[w,h]},1 +warp[0] [1],0,1,1 +warp[2] [1],2,1,1 tetraedron_shade: x0,y0,z0,x1,y1,z1,x2,y2,z2,x3,y3,z3,R0,G0,B0,...,R1,G1,B1,...,R2,G2,B2,...,R3,G3,B3,... () . t (+): 'text'. text (+): text,_x[%|~],_y[%|~],_{ font_height[%]>=0 | custom_font },_opacity,_color1,... . ( 't'). x y '~' ( [0,1]) . : { 0:left-justified | 0.5:centered | 1:right-justified }. '13' '128' ( /no-antialiasing) . (anti-aliasing) . . ( + ) . : 'x=y=0.01~' 'font_height=16' 'opacity=1' 'color1=0'. : [#1] image.jpg rescale2d ,600 div 2 y=0 repeat 30 { text {2*$>}" : This is a nice text!",10,$y,{2*$>},0.9,255 y+={2*$>} } [#2] 0 text "G'MIC",0,0,23,1,255 to: 'text_outline'. text_outline: text,_x[%|~],_y[%|~],{ _font_height[%]>0 | custom_font },_outline>=0,_opacity,_color1,... . x y '~' ( [0,1]) . : { 0:left-justified | 0.5:centered | 1:right-justified }. : 'x=y=0.01~' 'font_height=7.5%' 'outline=2' 'opacity=1' 'color1=color2=color3=255' 'color4=255'. : [#1] image.jpg text_outline "Hi there!",10,10,63,3 triangle_shade: x0,y0,x1,y1,x2,y2,R0,G0,B0,...,R1,G1,B1,...,R2,G2,B2,... . : [#1] image.jpg triangle_shade 20,20,400,100,120,200,255,0,0,0,255,0,0,0,255 truchet: _scale>0,_radius>=0,_pattern_type={ 0:Straight | 1:Curved } (truchet) . : 'scale=32' 'radius=5' 'pattern_type=1'. : [#1] 400,300 truchet , turbulence: _radius>0,_octaves={ 1,2,3...,12 },_alpha>0,_difference={ -10,10 },_mode={ 0,1,2,3 } (turbulence) . : 'radius=32' 'octaves=6' 'alpha=3' 'difference=0' 'mode=0'. : [#1] 400,400,1,3 turbulence 16 : https://gmic.eu/oldtutorial/_turbulence yinyang: . : [#1] 400,400 yinyang 11.11. (Matrix Computation) ------------------------------------- diagonal: . : [#1] 1,10,1,1,'y' +diagonal dijkstra: starting_vertex>=0,_ending_vertex={ -1:None | >=0 } / 'starting_vertex' ( 'ending_vertex' ) . 'N' 'NxN' ( 'inf' ). '1xNx1x2' '[distance,parent]' : - 'distance' '#y' 'starting_vertex' ( ). - 'parent' 'starting_vertex' . : 'ending_vertex=-1' eigen (+): . 2x2 3x3 . : [#1] (1,0,0;0,2,0;0,0,3) +eigen [#2] image.jpg structuretensors blur 2 eigen split[0] c : https://gmic.eu/oldtutorial/_eigen eye: _size>0 . : [#1] eye 3 eye 7 eye 10 fitsamples: nb_samples>0,_relevant_dimension[%]>0,_average_vector_varname,_dilation_vector_varname,_orientation_matrix_varname 'nb_samples' . 'M' 'N' ( M>1) ( 'MxNx1x1' 'Mx1xNx1' 'Mx1x1xN' '1xMxNx1' '1xMx1xN' '1x1xMxN'). . : 'relevant_dimension=100%' 'average_vector_varname=orientation_matrix_varname=dilation_matrix_varname=(undefined) fR'. invert: ( - ). : [#1] (0,1,0;0,0,1;1,0,0) +invert meigen: m>=1 'm' (https://en.wikipedia.org/wiki/Arnoldi_iteration) . 'm' . : [#1] (1,0,0;0,2,0;0,0,3) +meigen 3 mproj (+): [dictionary],_method,_max_iter={ 0:Auto | >0 },_max_residual>=0 (span) (dictionary) D Matching Pursuit . . '[dictionary]' D . 'method' . : - 0 = ( LU). - 1 = matching pursuit. - 2 = matching pursuit . - >=3 = orthogonal matching pursuit 'method-2' . 'max_iter' . '0' () 'max_iter' D . ( matching pursuit ). 'max_residual' . ( matching pursuit ). W D D*W . : 'method=0' 'max_iter=0' 'max_residual=1e-6'. orthogonalize: _mode = { 0:orthogonalize | 1:orthonormalize } - . : 'mode=0'. poweriteration: _nb_eigenvectors>0,_epsilon>0,_max_iter>0 'nb_eigenvectors' (power iteration) . : 'nb_eigenvectors=1' 'epsilon=1e-5' 'max_iter=100'. qr (+): _is_reduced_form={ 0:No | 1:Yes },_is_pivoting={ 0:No | 1:Yes } QR ( /pivoting) . A mxn (m n ) Q R A = Q*R . * Q 'mxm' 'is_reduced_form==0' 'mxmin(m,n)'. * R - 'mxn' 'is_reduced_form==0' 'min(m,n)xn'. * Q^T*Q = Id. * n>m mxm R - . 'is_pivoting' . : 'is_reduced_form=1' 'is_pivoting=0'. : [#1] 10,10,1,1,'v(100)' +qr +mmul[-2,-1] solve (+): [image] AX = B B A . . : [#1] (0,1,0;1,0,0;0,0,1) (1;2;3) +solve[-1] [-2] svd (+): (SVD) . : [#1] 10,10,1,1,'x==y?x+u(-0.2,0.2):0' +svd transpose: . : [#1] image.jpg +transpose trisolve: [image] AX = B B A . . : [#1] (0,0,1;1,0,0;0,1,0) (1;2;3) +trisolve[-1] [-2] 11.12. (3D Meshes) ----------------------------- +3d (+): 'add3d'. add3d (+): tx,_ty,_tz | [object3d] | (no arg) . ( '+3d'). : 'ty=tz=0'. : [#1] sphere3d 10 repeat 5 { +add3d[-1] 10,{u(-10,10)},0 color3d[-1] ${-rgb} } add3d [#2] repeat 20 { torus3d 15,2 color3d[-1] ${-rgb} mul3d[-1] 0.5,1 if $>%2 rotate3d[-1] 0,1,0,90 fi add3d[-1] 70 add3d rotate3d[-1] 0,0,1,18 }animate3d: nb_frames>0,_step_angle_x,_step_angle_y,_step_angle_z,_zoom_factor,0<=_fake_shadow_level<=100,_[background] . z ( ). '[background]' ( 800x800 ). : 'step_angle_x=0' 'step_angle_y=5' 'step_angle_z=0' 'zoom_factor=1' 'fake_shadow_level=50' 'background=(undefined)'. apply_camera3d: pos_x,pos_y,pos_z,target_x,target_y,target_z,up_x,up_y,up_z . : 'target_x=0' 'target_y=0' 'target_z=0' 'up_x=0' 'up_y=-1' 'up_z=0'. apply_matrix3d: a11,a12,a13,...,a31,a32,a33 . : [#1] torus3d 10,1 +apply_matrix3d {mul(rot(1,0,1,-15),[1,0,0,0,2,0,0,0,8],3)} array3d: size_x>=1,_size_y>=1,_size_z>=1,_offset_x[%],_offset_y[%],_offset_y[%] X Y Z. : 'size_y=1' 'size_z=1' 'offset_x=offset_y=offset_z=100%'. : [#1] torus3d 10,1 +array3d 5,5,5,110%,110%,300% arrow3d: x0,y0,z0,x1,y1,z1,_radius[%]>=0,_head_length[%]>=0,_head_radius[%]>=0 . : 'radius=5%' 'head_length=25%' 'head_radius=15%'. : [#1] repeat 10 { a:=$>*2*pi/10 arrow3d 0,0,0,{cos($a)},{sin($a)},-0.5 } +3d axes3d: _size_x,_size_y,_size_z,_font_size>0,_label_x,_label_y,_label_z,_is_origin={ 0:No | 1:Yes } x y z. : 'size_x=size_y=size_z=1' 'font_size=23' 'label_x=X' 'label_y=Y' 'label_z=Z' 'is_origin=1' : [#1] axes3d , boundingbox3d: . : [#1] torus3d 100,30 +boundingbox3d +3d[-1] [-2] box3d: _size_x,_size_y,_size_z (0,0,0) . : 'size_x=1' 'size_z=size_y=size_x'. : [#1] box3d 100,40,30 +primitives3d 1 color3d[-2] ${-rgb} c3d: 'center3d'. center3d: (0,0,0). ( 'c3d'). : [#1] repeat 100 { circle3d {u(100)},{u(100)},{u(100)},2 } add3d color3d[-1] 255,0,0 +center3d color3d[-1] 0,255,0 add3d chainring3d: _nb_links>=3,_x_scale>0,_y_scale>0,_z_scale>0 . 'nb_links' . : 'nb_links=16' 'x_scale=0.5' 'y_scale=1' 'z_scale=1'. : [#1] chainring3d circle3d: _x0,_y0,_z0,_radius>=0 . : 'x0=y0=z0=0' 'radius=1'. : [#1] repeat 500 { a:=$>*pi/250 circle3d {cos(3*$a)},{sin(2*$a)},0,{$a/50} color3d[-1] ${-rgb},0.4 } add3d circles3d: _radius>=0,_is_outlined={ 0:No | 1:Yes } . : 'radius=1' 'is_outlined=1'. : [#1] image.jpg luminance rescale2d ,40 threshold 50% * 255 pointcloud3d color3d[-1] 255,255,255 circles3d 0.7 col3d: 'color3d'. color3d: R,_G,_B,_opacity ( ) . ( 'col3d'). : 'B=G=R' 'opacity=(undefined)'. : [#1] torus3d 100,10 repeat 7 { +rotate3d[-1] 1,0,0,20 color3d[-1] ${-rgb} } add3d colorcube3d: _is_wireframe={ 0:No | 1:Yes } . : 'is_wireframe=0'. : [#1] colorcube3d mode3d 2 +primitives3d 1 colorize3d: _color_function,_passed_images_for_color_function (primitives) . * 'color_function' G GA RGB RGBA 'x' 'y' 'z' (barycenter) . * 'passed_images_for_color_function' ( '[0,2]') 'color_function' . : 'color_function=[x,y,z]' 'passed_images_for_color_function='. : [#1] torus3d 100,40,640,100 c3d n3d mul3d 256 +3d 128,128,128 sample colorful,257 colorize3d[0] "I(#-1,x,y,0)",[1] cone3d: _radius,_height,_nb_subdivisions>0 (0,0,0) . : 'radius=1' 'height=1' 'nb_subdivisions=24'. : [#1] cone3d 10,40 +primitives3d 1 color3d[-2] ${-rgb} cubes3d: _size>=0 . : 'size=1'. : [#1] image.jpg luminance rescale2d ,40 threshold 50% * 255 pointcloud3d color3d[-1] 255,255,255 cubes3d 1 cup3d: _resolution>0 . : 'resolution=128'. : [#1] cup3d , curve3d: _"x(t)",_"y(t)",_"z(t)",_"r(t)",_resolution>1,_tmin,_tmax,_nb_sides>=0,_cap_style={ 0:Open | 1 | Capped | 2 | Closed } . 'r(t)==0' 'nb_sides<3' . : 'x(t)=cos(2*pi*t)' 'y(t)=sin(2*pi*t)' 'z(t)=t' 'r(t)=0.025' 'resolution=128' 'tmin=0' 'tmax=1' 'nb_sides=16' 'cap_style=1'. : [#1] curve3d , cylinder3d: _radius,_height,_nb_subdivisions>0 (0,0,0) . : 'radius=1' 'height=1' 'nb_subdivisions=24'. : [#1] cylinder3d 10,40 +primitives3d 1 color3d[-2] ${-rgb} delaunay3d: (Delaunay) . . . : [#1] 500,500 noise 0.05,2 eq 1 * 255 +delaunay3d color3d[1] 255,128,0 dilate_circ[0] 5 to_rgb[0] +object3d[0] [1],0,0,0,1,1 max[-1] [0] depthmap3d: [object3d],_x[%],_y[%],_z_,is_double_sided={ 0:No | 1:Yes },_is_zbuffer={ 0:No | 1:Yes },_focal . : 'x=y=50%' 'z=0' 'is_zbuffer=1'. . : [#1] gmic3d center3d normalize3d rotate3d 0,1,0,45 mul3d 360 400,400 depthmap3d[-1] [-2] snapshot3d[-2] 400 distribution3d: . : [#1] image.jpg distribution3d colorcube3d primitives3d[-1] 1 add3d /3d (+): 'div3d'. div3d (+): factor | factor_x,factor_y,_factor_z . ( '/3d'). : 'factor_z=1'. : [#1] torus3d 5,2 repeat 5 { +add3d[-1] 12,0,0 div3d[-1] 1.2 color3d[-1] ${-rgb} } add3ddb3d: 'double3d'. double3d: _is_double_sided={ 0:No | 1:Yes } / . ( 'db3d'). : 'is_double_sided=1'. : [#1] mode3d 1 repeat 2 { torus3d 100,30 rotate3d[-1] 1,1,0,60 double3d $> snapshot3d[-1] 400 } elevation3d: { z-factor | [elevation_map] | 'formula' },base_height={ -1 | >=0 } | (no arg) . (no arg) 'z-factor' L2 . . : [#1] image.jpg +blur 5 elevation3d. 0.75 [#2] 128,128,1,3,u(255) plasma 10,3 blur 4 sharpen 10000 n 0,255 elevation3d[-1] 'X=(x-64)/6;Y=(y-64)/6;-100*exp(-(X^2+Y^2)/30)*abs(cos(X)*sin(Y)) ' empty3d: . : [#1] empty3d extract_textures3d: . : [#1] image.jpg imagesphere3d 10,10 +extract_textures3d extrude3d: _depth>0,_resolution>0,_smoothness[%]>=0 () XY . : 'depth=16' 'resolution=1024' 'smoothness=0.5%'. : [#1] image.jpg threshold 50% extrude3d 16 f3d: 'focal3d'. focal3d: focal . ( 'f3d'). 'focal' 0 ( ). 'focal' . : 'focal=700'. : [#1] repeat 5 { torus3d 100,30 rotate3d[-1] 1,1,0,60 focal3d {$<*90} snapshot3d[-1] 400 } remove[0] fov3d: fov_angle>=0,_image_resolution>0 ( ) . . : 'fov_angle=45' 'image_size=max(w,h)' ( ). gaussians3d: _size>0,0<=_opacity<=1 . : [#1] image.jpg rescale2d ,32 distribution3d gaussians3d 20 colorcube3d primitives3d[-1] 1 +3d gmic3d: G'MIC. : [#1] gmic3d +primitives3d 1 gyroid3d: _resolution>0,_zoom (0,0,0) . : 'resolution=32' 'zoom=5'. : [#1] gyroid3d 48 +primitives3d 1 histogram3d: . : [#1] image.jpg rescale2d 64 histogram3d circles3d 3 opacity3d. 0.75 colorcube3d primitives3d[-1] 1 add3d image6cube3d: . : [#1] image.jpg animate flower,"30,0","30,5",6 image6cube3d imageblocks3d: _maximum_elevation,_smoothness[%]>=0 . . : 'maximum_elevation=10' 'smoothness=0'. : [#1] image.jpg rescale2d ,32 imageblocks3d -20 mode3d 3 imagecube3d: . : [#1] image.jpg imagecube3d imageplane3d: . : [#1] image.jpg imageplane3d imagepyramid3d: . : [#1] image.jpg imagepyramid3d imagerubik3d: _xy_tiles>=1,0<=xy_shift<=100,0<=z_shift<=100 . : 'xy_tiles=3' 'xy_shift=5' 'z_shift=5'. : [#1] image.jpg imagerubik3d , imagesphere3d: _resolution1>=3,_resolution2>=3 . : 'resolution1=32' 'resolutions2=16'. : [#1] image.jpg imagesphere3d 32,16 isoline3d (+): isovalue[%] | 'formula',value,_x0,_y0,_x1,_y1,_size_x[%]>0,_size_y[%]>0 . : 'x0=y0=-3' 'x1=y1=3' 'size_x=size_y=256'. : [#1] image.jpg blur 1 isoline3d 50% [#2] isoline3d 'X=x-w/2;Y=y-h/2;(X^2+Y^2)%20',10,-10,-10,10,10 isosurface3d (+): isovalue[%] | 'formula',value,_x0,_y0,_z0,_x1,_y1,_z1,_size_x[%]>0,_size_y[%]>0,_size_z[%]>0 . : 'x0=y0=z0=-3' 'x1=y1=z1=3' 'size_x=size_y=size_z=32'. : [#1] image.jpg rescale2d ,128 luminance threshold 50% expand z,2 blur 1 isosurface3d 50% mul3d 1,1,30 [#2] isosurface3d 'x^2+y^2+abs(z)^abs(4*cos(x*y*z*3))',3 label3d: "text",font_height>=0,_opacity,_color1,... . : 'font_height=13' 'opacity=1' 'color=255,255,255'. label_points3d: _label_size>0,_opacity . : 'label_size=13' 'opacity=0.8'. : [#1] torus3d 100,40,6,6 label_points3d 23,1 mode3d 1 lathe3d: _resolution>0,_smoothness[%]>=0,_max_angle>=0 XY . : 'resolution=128' 'smoothness=0.5%' 'max_angle=361'. : [#1] 300,300 rand -1,1 blur 40 sign normalize 0,255 lathe3d , l3d (+): 'light3d'. light3d (+): position_x,position_y,position_z | [texture] | (no arg) . ( 'l3d'). (no arg) . : [#1] torus3d 100,30 specs3d 1.2 repeat 5 { light3d {$>*100},0,-300 +snapshot3d[0] 400 } remove[0] line3d: x0,y0,z0,x1,y1,z1 . : [#1] repeat 100 { a:=$>*pi/50 line3d 0,0,0,{cos(3*$a)},{sin(2*$a)},0 color3d. ${-rgb} } add3d lines3d: _length>=0 . : 'length=1'. : [#1] torus3d 100,40 +lines3d 20lissajous3d: resolution>1,a,A,b,B,c,C 'x(t)=sin(a*t+A*2*pi)' 'y(t)=sin(b*t+B*2*pi)' 'z(t)=sin(c*t+C*2*pi)'. : 'resolution=1024' 'a=2' 'A=0' 'b=1' 'B=0' 'c=0' 'C=0'. : [#1] lissajous3d , m3d: 'mode3d'. mode3d: _mode . ( 'm3d'). 'mode' { -1:Bounding-box | 0:Dots | 1:Wireframe | 2:Flat | 3:Flat-shaded | 4:Gouraud-shaded | 5:Phong- shaded } . ('mode==-1') . : 'mode=4'. : [#1] (0,1,2,3,4,5) repeat w { torus3d 100,30 rotate3d[-1] 1,1,0,60 mode3d {0,@$>} snapshot3d[-1] 300 } remove[0] md3d: 'moded3d'. moded3d: _mode . ( 'md3d'). 'mode' { -1:Bounding-box | 0:Dots | 1:Wireframe | 2:Flat | 3:Flat-shaded | 4:Gouraud-shaded | 5:Phong- shaded } . : 'mode=-1'. *3d (+): 'mul3d'. mul3d (+): factor | factor_x,factor_y,_factor_z . ( '*3d'). : 'factor_z=1'. : [#1] torus3d 5,2 repeat 5 { +add3d[-1] 10,0,0 mul3d[-1] 1.2 color3d[-1] ${-rgb} } add3d mt3d: 'multithreaded3d'. multithreaded3d: _is_multi_threaded_rendering={ 0:No | 1:Yes } / . ( 'mt3d'). : 'is_multithreaded_rendering=0'. n3d: 'normalize3d'. normalize3d: . ( 'n3d'). : [#1] repeat 100 { circle3d {u(3)},{u(3)},{u(3)},0.1 } add3d color3d[-1] 255,0,0 +normalize3d[-1] color3d[-1] 0,255,0 add3d normalmap3d: [object3d],_x[%],_y[%],_z_,is_double_sided={ 0:No | 1:Yes },_is_zbuffer={ 0:No | 1:Yes },_focal . : 'x=y=50%' 'z=0' 'is_zbuffer=1'. . : [#1] gmic3d center3d normalize3d rotate3d 0,1,0,45 mul3d 360 400,400,1,3 normalmap3d[-1] [-2] snapshot3d[-2] 400 normals3d: output_mode={ 0:vertices | 1:primitives | 2:vertices+primitives }. . : [ x,y,z,u,v,w ] (x,y,z) (u,v,z) . : 'mode=2'. o3d: 'opacity3d'. j3d (+): 'object3d'. object3d (+): [object3d],_x[%],_y[%],_z,_opacity,_rendering_mode,_is_double_sided={ 0:No | 1:Yes },_is_zbuffer={ 0:No | 1:Yes },_focal,_light_x,_light_y,_light_z, _specular_lightness,_specular_shininess,_is_multithreaded_rendering={ 0:No | 1:Yes } . ( 'j3d'). 'rendering_mode' { 0:Dots | 1:Wireframe | 2:Flat | 3:Flat-shaded | 4:Gouraud-shaded | 5:Phong-shaded } . : 'x=y=50%' 'z=0' 'opacity=1' 'is_zbuffer=1'. . : [#1] image.jpg torus3d 100,10 cone3d 30,-120 add3d[-2,-1] rotate3d. 1,1,0,60 object3d[0] [-1],50%,50% keep[0] opacity3d: opacity () . ( 'o3d'). : [#1] torus3d 100,10 repeat 7 { +rotate3d[-1] 1,0,0,20 opacity3d[-1] {u} } add3d parametric3d: _x(a,b),_y(a,b),_z(a,b),_amin,_amax,_bmin,_bmax,_res_a>0,_res_b>0,_res_x>0,_res_y>0,_res_z>0,_smoothness>=0,_isovalue>=0 '(a,b) (x(a,b),y(a,b),z(a,b))'. : 'x=(2+cos(b))*sin(a)' 'y=(2+cos(b))*cos(a)' 'c=sin(b)' 'amin=-pi' 'amax=pi' 'bmin=-pi' 'bmax=pi' 'res_a=512' 'res_b=res_a' 'res_x=64' 'res_y=res_x' 'res_z=res_y' 'smoothness=2%' 'isovalue=10%'. : [#1] parametric3d , pca_patch3d: _patch_size>0,_M>0,_N>0,_normalize_input={ 0:No | 1:Yes },_normalize_output={ 0:No | 1:Yes },_lambda_xy patch-pca . patch-pca M N . : 'patch_size=7' 'M=1000' 'N=3000' 'normalize_input=1' 'normalize_output=0' 'lambda_xy=0'. : [#1] image.jpg pca_patch3d 7 plane3d: _size_x,_size_y,_nb_subdivisions_x>0,_nb_subdisivions_y>0 (0,0,0) . : 'size_x=1' 'size_y=size_x' 'nb_subdivisions_x=nb_subdivisions_y=24'. : [#1] plane3d 50,30 +primitives3d 1 color3d[-2] ${-rgb} point3d: x0,y0,z0 . : [#1] repeat 1000 { a:=$>*pi/500 point3d {cos(3*$a)},{sin(2*$a)},0 color3d[-1] ${-rgb} } add3d pointcloud3d: . : [#1] image.jpg luminance rescale2d ,100 threshold 50% mul 255 pointcloud3d color3d[-1] 255,255,255 pose3d: p1,...,p12 (pose) . : [#1] torus3d 100,20 pose3d 0.152437,1.20666,-0.546366,0,-0.535962,0.559129,1.08531,0,1.21132,0.0955431,0.548966,0,0,0,-206,1 snapshot3d 400 p3d: 'primitives3d'. primitives3d: mode (primitives) . ( 'p3d'). 'mode' { 0:Points | 1:Outlines | 2:Non- textured } . : [#1] sphere3d 30 primitives3d 1 torus3d 50,10 color3d[-1] ${-rgb} add3d projections3d: _x[%],_y[%],_z[%],_is_bounding_box={ 0:No | 1:Yes },nb_subdivisions>0 xy xz yz . : 'x=y=z=50%' 'is_bounding_box=1' 'nb_subdividions=5'. pyramid3d: width,height (0,0,0) . : [#1] pyramid3d 100,-100 +primitives3d 1 color3d[-2] ${-rgb} quadrangle3d: x0,y0,z0,x1,y1,z1,x2,y2,z2,x3,y3,z3 . : [#1] quadrangle3d -10,-10,10,10,-10,10,10,10,10,-10,10,10 repeat 10 { +rotate3d[-1] 0,1,0,30 color3d[-1] ${-rgb},0.6 } add3d mode3d 2 random3d: nb_points>=0 [0,1]^3. : [#1] random3d 100 circles3d 0.1 opacity3d 0.5 rv3d: 'reverse3d'. reverse3d: (primitives) . ( 'rv3d'). : [#1] torus3d 100,40 +reverse3d r3d (+): 'rotate3d'. rotate3d (+): u,v,w,angle ( ). ( 'r3d'). : [#1] torus3d 100,10 repeat 7 { +rotate3d[-1] 1,0,0,20 } add3drotation3d: u,v,w,angle 3x3 ( ). : [#1] rotation3d 1,0,0,0 rotation3d 1,0,0,90 rotation3d 1,0,0,180 sierpinski3d: _recursion_level>=0,_width,_height . : 'recursion_level=4' 'width=1' 'height=1'. : [#1] sierpinski3d 3,100,-100 +primitives3d 1 color3d[-2] ${-rgb} size3d: . skeleton3d: _metric,_frame_type={ 0:Squares | 1:Diamonds | 2:Circles | 3:Auto },_skeleton_opacity,_frame_opacity,_is_frame_wireframe={ 0:No | 1:Yes } . 'metric' { 0:Chebyshev | 1:Manhattan | 2:Euclidean } . : 'metric=2' 'frame_type=3' 'skeleton_opacity=1' 'frame_opacity=0.1'. : [#1] shape_cupid 480 +skeleton3d , snapshot3d: _size>0,_zoom>=0,_backgroundR,_backgroundG,_backgroundB,_backgroundA,_fov_angle>=0 | [background_image],zoom>=0,_fov_angle>=0 . 'zoom' 0 . : 'size=1024' 'zoom=1' '[background_image]=(unused)' 'fov_angle=45'. : [#1] torus3d 100,20 rotate3d 1,1,0,60 snapshot3d 400,1.2,128,64,32 [#2] torus3d 100,20 rotate3d 1,1,0,60 sample ? +snapshot3d[0] [1],1.2 sl3d: 'specl3d'. specl3d: value>=0 (specular) . ( 'sl3d'). : 'value=0.25'. : [#1] (0,0.3,0.6,0.9,1.2) repeat w { torus3d 100,30 rotate3d[-1] 1,1,0,60 color3d[-1] 255,0,0 specl3d {0,@$>} snapshot3d[-1] 400 } remove[0] ss3d: Shortcut for command 'specs3d'. specs3d: value>=0 (shininess) . ( 'ss3d'). : 'value=0.1'. : [#1] (0,0.3,0.6,0.9,1.2) repeat w { torus3d 100,30 rotate3d[-1] 1,1,0,60 color3d[-1] 255,0,0 specs3d {0,@$>} snapshot3d[-1] 400 } remove[0] sphere3d: radius,_nb_recursions!=0 | radius,_nb_phi>=3,_nb_theta>=3 (0,0,0) . * : - 'nb_recursions>0' icosahedron () . - 'nb_recursions<0' cube () . * . : 'nb_recursions=3'. : [#1] sphere3d 100 +primitives3d 1 color3d[-2] ${-rgb} spherical3d: "radius_function(phi,theta)",_nb_recursions!=0 | "radius_function(phi,theta)",_nb_phi>=3,_nb_theta>=3 (0,0,0) . sphere3d . : 'nb_recursions=5'. : [#1] spherical3d "abs(1+0.5*cos(3*phi)*sin(4*theta))" +primitives3d 1 spline3d: x0[%],y0[%],z0[%],u0[%],v0[%],w0[%],x1[%],y1[%],z1[%],u1[%],v1[%],w1[%],_nb_vertices>=2 . : 'nb_vertices=128'. : [#1] repeat 100 { spline3d {u},{u},{u},{u},{u},{u},{u},{u},{u},{u},{u},{u},128 color3d[-1] ${-rgb} } box3d 1 primitives3d[-1] 1 add3d s3d: 'split3d'. split3d: : { header, sizes, vertices, primitives, colors, opacities }. ( 's3d'). y ( 'append y'). : [#1] box3d 100 +split3d sprite3d: . . : [#1] image.jpg sprite3d sprites3d: [sprite],_sprite_has_alpha_channel={ 0:No | 1:Yes } . 'sprite_has_alpha_channel' 1 . : 'mask_has_alpha_channel=0'. : [#1] torus3d 100,20 image.jpg rescale2d[-1] ,64 100%,100% gaussian[-1] 30%,30% *[-1] 255 append[-2,-1] c +sprites3d[0] [1],1 display_rgba[-2] star3d: _nb_branches>0,0<=_thickness<=1 '(0,0,0)' . : 'nb_branches=5' 'thickness=0.38'. : [#1] star3d , +primitives3d 1 color3d[-2] ${-rgb} streamline3d (+): x[%],y[%],z[%],_L>=0,_dl>0,_interpolation,_is_backward={ 0:No | 1:Yes },_is_oriented={ 0:No | 1:Yes } | 'formula',x,y,z,_L>=0,_dl>0,_interpolation,_is_backward={ 0:No | 1:Yes },_is_oriented={ 0:No | 1:Yes } . 'interpolation' { 0:Nearest integer | 1:1st-order | 2:2nd-order | 3:4th-order } . : 'dl=0.1' 'interpolation=2' 'is_backward=0' 'is_oriented=0'. : [#1] 100,100,100,3 rand -10,10 blur 3 repeat 300 { +streamline3d[0] {u(100)},{u(100)},{u(100)},1000,1,1 color3d[-1] ${-rgb} } remove[0] box3d 100 primitives3d[-1] 1 add3d -3d (+): 'sub3d'. sub3d (+): tx,_ty,_tz . ( '3d'). : 'ty=tz=0'. : [#1] sphere3d 10 repeat 5 { +sub3d[-1] 10,{u(-10,10)},0 color3d[-1] ${-rgb} } add3d subdivide3d: . superformula3d: resolution>1,m>=1,n1,n2,n3 . : 'resolution=1024' 'm=8' 'n1=1' 'n2=5' 'n3=8'. : [#1] superformula3d , surfels3d: 0<=_left_right_attenuation<=1,0<=_top_bottom_attenuation<=1,0<=_closer_further_attenuation<=1 ( ). . . : 'left_right_attenuation=1' 'top_bottom_attenuation=1' 'closer_further_attenuation=1'. : [#1] 100,100,100 = 1,40%,40%,40% = 1,60%,60%,60% distance 1 lt 30% blur 3 gt 50% surfels3d 0.5,0.75,1 tensors3d: _radius_factor>=0,_shape={ 0:Box | >=N:Ellipsoid },_radius_min>=0 . 'shape'>0 . : 'radius_factor=1' 'shape=2' 'radius_min=0.05'. : [#1] 7,7,7,9,"U = unitnorm([x,y,z] - int([w,h,d]/2)); mul(U,U,3) + 0.3*eye(3)" tensors3d 0.8 text_pointcloud3d: _"text1",_"text2",_smoothness . : 'text1="text1"' 'text2="text2"' 'smoothness=1'. : [#1] text_pointcloud3d "G'MIC","Rocks!" text3d: text,_{ font_height>=0 | custom_font },_depth>0,_smoothness . : 'font_height=53' 'depth=10' 'smoothness=1.5'. : [#1] text3d "G'MIC as a0D logo!" t3d: 'texturize3d'. texturize3d: [ind_texture],_[ind_coords] . ( 't3d'). '[ind_coords]' XY . : 'ind_coords=(undefined)'.: [#1] image.jpg torus3d 100,30 texturize3d[-1] [-2] keep[-1] torus3d: _radius1,_radius2,_nb_subdivisions1>2,_nb_subdivisions2>2 (0,0,0) . : 'radius1=1' 'radius2=0.3' 'nb_subdivisions1=24' 'nb_subdivisions2=12'. : [#1] torus3d 10,3 +primitives3d 1 color3d[-2] ${-rgb} triangle3d: x0,y0,z0,x1,y1,z1,x2,y2,z2 . : [#1] repeat 100 { a:=$>*pi/50 triangle3d 0,0,0,0,0,3,{cos(3*$a)},{sin(2*$a)},0 color3d[-1] ${-rgb} } add3d volume3d: . : [#1] image.jpg animate blur,0,5,30 append z volume3d voxelize3d: _max_resolution>0,_fill_interior={ 0:No | 1:Yes },_preserve_colors={ 0:No | 1:Yes } . : 'max_resolution=128' 'fill_interior=1' 'preserve_colors=0'. weird3d: _resolution>0 (weird object) (0,0,0) . : 'resolution=32'. : [#1] weird3d 48 +primitives3d 1 color3d[-2] ${-rgb} 11.13. (Flow Control) ----------------------------- ap: 'apply_parallel'. apply_parallel: "command" . ( 'ap'). : [#1] image.jpg +mirror x +mirror y apply_parallel "blur 3" apc: 'apply_parallel_channels'. apply_parallel_channels: "command" . ( 'apc'). : [#1] image.jpg apply_parallel_channels "blur 3" apo: 'apply_parallel_overlap'. apply_parallel_overlap: "command",overlap[%],nb_threads={ 0:Auto | 1 | 2 | 4 | 8 | 16 } 'nb_threads' . ( 'apo'). 'nb_threads' . : 'overlap=0' 'nb_threads=0'. : [#1] image.jpg +apply_parallel_overlap "smooth 500,0,1",1 at: 'apply_tiles'. apply_tiles: "command",_tile_width[%]>0,_tile_height[%]>0,_tile_depth[%]>0,_overlap_width[%]>=0,_overlap_height[%]>=0,_overlap_depth[%]>=0,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } () . ( 'at'). : 'tile_width=tile_height=tile_depth=10%' 'overlap_width=overlap_height=overlap_depth=0' 'boundary_conditions=1'. : [#1] image.jpg +equalize[0] 256 +apply_tiles[0] "equalize 256",16,16,1,50%,50% apply_timeout: "command",_timeout={ 0:No timeout | >0:With specified timeout (in seconds) } (timeout). '$_is_timeout' '1' '0' . : 'timeout=20'. check (+): condition (false) . check3d (+): _is_full_check={ 0:No | 1:Yes } . . : 'is_full_check=1'. continue (+): 'do...while' 'for...done' 'foreach...done' 'local...done' 'repeat...done'. : [#1] image.jpg repeat 10 blur 1 if 1==1 continue fi deform 10 done break (+): 'do...while' 'for...done' 'foreach...done' 'local...done' 'repeat...done'. : [#1] image.jpg repeat 10 blur 1 if 1==1 break fi deform 10 done do (+): 'do...while'. : [#1] image.jpg luminance i:=ia+2 do set 255,{u(100)}%,{u(100)}% while ia<$i done (+): 'for/foreach/local/repeat...done' 'for/foreach/repeat' . ( '}'). elif (+): condition 'elif...[else]...fi' 'if' 'condition' { 0:False | other:True } . : https://gmic.eu/tutorial/iffi else (+): 'if' 'elif' . : https://gmic.eu/tutorial/iffi fi (+): 'if...[elif]...[else]...fi'. ( 'fi'). : https://gmic.eu/tutorial/iffi error (+): message (stderr) 'onfail' . ( ) . eval (+): expression . * (status) . * . . 'eval' fill . x (+): 'exec'. exec (+): _is_verbose={ 0:No | 1:Yes },"command" (system call). (status) . 'is_verbose=1' stdout/stderr . ( 'x'). : 'is_verbose=1'. xo: 'exec_out'. exec_out: _mode,"command" 'stdout' / 'stderr' . 'mode' { 0:Stdout | 1:Stderr | 2:Stdout+stderr } . for (+): condition 'for...done'. : [#1] image.jpg rescale2d ,32 400,400,1,3 x=0 for $x<400 image[1] [0],$x,$x x+=40 done foreach (+): 'foreach...done' . : [#1] sample colorful,earth,duck,dog foreach[^2] +blur 10 sub normalize 0,255 done if (+): condition 'if...[elif]...[else]...fi' . 'condition' { 0:False | other:True } . : [#1] image.jpg if ia<64 add 50% elif ia<128 add 25% elif ia<192 sub 25% else sub 50% fi cut 0,255 : https://gmic.eu/tutorial/iffi l (+): 'local'. local (+): 'local...[onfail]...done' . ( 'l'). : [#1] image.jpg local[] 300,300,1,3 rand[0] 0,255 blur 4 sharpen 1000 done [#2] image.jpg +local repeat 3 { deform 20 } done: https://gmic.eu/oldtutorial/_local noarg (+): 'noarg' G'MIC . . onfail (+): 'local...done' . . : [#1] image.jpg +local blur -3 onfail mirror x done parallel (+): _wait_threads,"command_1","command_2",... . . 'wait_threads' { 0:When current environment ends | 1:Immediately } . : 'wait_threads=1'. : [#1] image.jpg [0] parallel "blur[0] 3","mirror[1] c" progress (+): 0<=value<=100 | -1 . G'MIC . q (+): 'quit'. quit (+): G'MIC. ( 'q'). repeat (+): nb_iterations 'nb_iterations' 'repeat...done'. 'nb_iterations' . : [#1] image.jpg split y repeat $! n=$> shift[$n] $<,0,0,0,2 done append y [#2] image.jpg mode3d 2 repeat 4 imagecube3d rotate3d 1,1,0,40 snapshot3d 400,1.4 done : https://gmic.eu/oldtutorial/_repeat return (+): . rprogress: 0<=value<=100 | -1 | "command",0<=value_min<=100,0<=value_max<=100 ( ) . run: "G'MIC pipeline" G'MIC . skip (+): item . u (+): 'status'. status (+): status_string . . ( 'u'). : [#1] image.jpg command "foo : u0=Dark u1=Bright status ${u{ia>=128}}" text_outline ${-foo},2,2,23,2,1,255 while (+): condition 'do...while' 'do' . 'condition' { 0:False | other:True } . 11.14. (Neural Networks) ------------------------------------- nn_lib :: 'nn_lib' G'MIC . '$_nn_lib' . nn_add: out,in0,in1,_in2,_in3 'add' ( ) . 'in_k' ( ). nn_append: out,in0,in1,_in2,_in3,axis={ x | y | z | c } 'append' . 'in_k' ( 'axis' ). nn_check_layer: layer_name . nn_clone: out0,out1,in 'clone' . nn_columnpatch2d: out,in,out_width>0,out_height>0,patch_size>0,_overlap>0 'columnpatch2d' ( ) . : 'overlap=0'. nn_conv: out,in,nb_channels>0,_kernel_width>0,_kernel_height>0,_kernel_depth>0,_stride_x>0,_stride_y>0,_stride_z>0,_dilation_x,_dilation_y,_dilation_z, _shrink_x>=0,_shrink_y>=0_,_shrink_z>=0,boundary_conditions,_learning_mode,_weight_decay>=0,_initialization 'conv' ( //) . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'learning_mode' { 0:No learning | 1:Weights only | 2:Biases only | 3:Weights+biases } . 'initialization' { 0:Zero | 1:Identity | 2:Lecun-initialization | 3:He-initialization | 4:Residual He- initialization } . : 'stride_x=stride_y=stride_z=1' 'dilation_x=dilation_y=dilation_z=1' 'shrink_x=shrink_y=shrink_z=0' 'boundary_conditions=1' 'learning_mode=3' 'weight_decay=0' 'initialization=3'. nn_conv2d: out,in,nb_channels>0,_kernel_size>0,_stride>0,_dilation,_shrink>=0,_boundary_conditions,_learning_mode,_weight_decay>=0,_initialization 'conv2d' ( ) . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'learning_mode' { 0:No learning | 1:Weights only | 2:Biases only | 3:Weights+biases } . 'initialization' { 0:Zero | 1:Identity | 2:Lecun-initialization | 3:He-initialization | 4:Residual He- initialization } . : 'kernel_size=3' 'stride=1' 'dilation=1' 'shrink=0' 'boundary_conditions=1' 'learning_mode=3' 'weight_decay=0' 'initialization=3'. nn_conv3d: out,in,nb_channels>0,_kernel_size>0,_stride>0,_dilation,_shrink>=0,_boundary_conditions,_learning_mode,_weight_decay>=0,_initialization 'conv3d' ( ) . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . 'learning_mode' { 0:No learning | 1:Weights only | 2:Biases only | 3:Weights+biases } . 'initialization' { 0:Zero | 1:Identity | 2:Lecun-initialization | 3:He-initialization | 4:Residual He- initialization } . : 'kernel_size=3' 'stride=1' 'dilation=1' 'shrink=0' 'boundary_conditions=1' 'learning_mode=3' 'weight_decay=0' 'initialization=3'. nn_crop: out,in,x0,y0,z0,c0,x1,y1,z1,c1,_boundary_conditions 'crop' . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'boundary_conditions=0'. nn_div: out,in0,in1 'div' ( ) . 'in0' 'in1' ( ). nn_dropout: out,in,0<=dropout_rate<1 'dropout' . nn_fc: out,in,nb_channels>0,_learning_mode,_weight_decay>=0,_initialization 'fc' ( ) . 'learning_mode' { 0:No learning | 1:Weights only | 2:Biases only | 3:Weights+biases } . 'initialization' { 0:Zero | 1:Identity | 2:Lecun-initialization | 3:He-initialization 4:Residual He- initialization } . : 'learning_mode=3' 'weight_decay=0' 'initialization=3'. nn_fft: out,in,io_mode,_is_inverse={ 0:No | 1:Yes },_axes. 'fft' ( ) . 'io_mode' / . { 0:real -> real | 1:(real,imag) -> real | 2:real -> (real, imag) | 3:(real,imag) -> (real,imag) } . '(real,imag)' ( N ) 2N- . 'axes' { 0 (all) | x | y | z | xy | xz | yz | xyz } . : 'is_inverse=0' 'axes=0 (all)'. nn_init: _network_name . : 'network_name=nn'. nn_input: out,width,_height,_depth,_spectrum 'input' . : 'height=1' 'depth=1' 'spectrum=1'. nn_linear: out,in,nb_channels>0,_axis={ x | y | z | c},_learning_mode,_weight_decay>=0,_initialization 'linear' . 'learning_mode' { 0:No learning | 1:Weights only | 2:Biases only | 3:Weights+biases } . 'initialization' { 0:Zero | 1:Identity | 2:Lecun-initialization | 3:He-initialization 4:Residual He- initialization } . : 'learning_mode=3' 'weight_decay=0' 'initialization=3'. nn_load: 'filename.gmz',_include_trainer_data={ 0:No | 1:Yes } ( .gmz). '.gmz' . : 'include_trainer_data=1'. nn_loss_add: out,in0,in1,... 'add' ( ). nn_loss_bce: out,in,ground_truth,_weight 'bce' ( ). 'ground_truth' (: 0). : 'weight=1'. nn_loss_ce: out,in,ground_truth,_weight 'ce' ( ). 'ground_truth' (: 0). : 'weight=1'. nn_loss_l1: out,in,_ground_truth,_weight 'l1' ( L1). 'ground_truth' (: 0). : 'weight=1'. nn_loss_l2: out,in,_ground_truth,_weight 'l2' ( L2). 'ground_truth' (: 0). : 'weight=1'. nn_loss_lp: out,in,_ground_truth,_p>0,_weight 'lp' ( Lp). 'ground_truth' (: 0). : 'p=1.5' 'weight=1'. nn_loss_mse: out,in,_ground_truth,_weight 'mse' ( ). 'ground_truth' (: 0). : 'weight=1'. nn_loss_sigmoid_bce: out,in,ground_truth,_weight 'sigmoid_bce' ( ). 'ground_truth' (: 0). ( ). : 'weight=1'. nn_loss_smoothl1: out,in,_ground_truth,_weight 'smoothl1' ( L1 ). 'ground_truth' (: 0). : 'weight=1'. nn_loss_softmax_ce: out,in,ground_truth,_weight 'softmax_ce' ( ). 'ground_truth' (: 0). : 'weight=1'. nn_maxpool2d: out,in,_patch_size>1,_is_maxabs={ 0:No | 1:Yes } 'maxpool2d' ( ) . : 'patch_size=2' 'is_maxabs=0'. nn_maxpool3d: out,in,_patch_size>1,_is_maxabs={ 0:No | 1:Yes } 'maxpool3d' ( ) . : 'patch_size=2' 'is_maxabs=0'. nn_mmul: out,in0,in1 'mmul' ( 'in0*in1') . 'in0' 'in1' . nn_mmult: out,in0,in1 'mmult' ( 'in0*in1^t') . 'in0' 'in1' . nn_mul: out,in0,in1,_in2,_in3 'mul' ( ) . 'in_k' ( ). nn_network: _network_name / ( ). . nn_nl: out,in,_activation 'nl' ( ) . 'activation' { elu | gelu | leakyrelu | linear | log | normalize_l1 | normalize_l1_x | normalize_l1_y | normalize_l1_z | normalize_l1_c | normalize_l2 | normalize_l2_x | normalize_l2_y | normalize_l2_z | normalize_l2_c | relu | sigmoid | sin | sinc | softmax | softmax_x | softmax_y | softmax_z | softmax_c | sqr | sqrt | swish | tanh | z2 | z3 } . : 'activation=leakyrelu'. nn_noise: out,in,_amplitude,_noise_type,_training_only={ 0:No | 1:Yes } 'noise' . 'noise_type' { 0:Gaussian | 1:Uniform | 2:Salt&pepper | 3:Poisson | 4:Rice } . 'training_only' . : 'amplitude=0.1' 'noise_type=0' 'training_only=1'. nn_norm: out,in,p>=0,_axis={ 0 | x | y | z | c } 'norm' ( Lp) . 'p' { 0:Squared norm | >0:Lp-norm } . : 'p=2' 'axis=0'. nn_normalize: out,in,axes,_normalization_type={ 0:Avg_std | 1:RMS },_group_x>=0,_group_y>=0,_group_z>=0,_group_c>=0,_learning_mode 'normalize' . Layernorm InstanceNorm GroupNorm RMSNorm . 'axes' / . 'axes' { x | y | z | c | xy | xz | xc | yz | yc | xyz | xyc | xzc | yzc | xyzc } . : * 'axes=c' . * 'axes=xyz' (x,y,z) . '0' 'group_*' 'N' . 'learning_mode' { 0:No learning | 1:Gamma only | 2:Beta only | 3:Gamma+beta } . : 'normalization_type=0' 'group_x=group_y=group_z=group_c=0' 'learning_mode=3'. nn_parameters: out,width>0,_height>0,_depth>0,_spectrum>0,_learning_mode,_weight_decay>=0,_initialization 'parameters' ( ) . 'learning_mode' { 0:No learning | 1:Weights } . 'initialization' { 0:Zero | 1:Identity | 2:Lecun-initialization | 3:He-initialization 4:Residual He- initialization } . : 'height=depth=spectrum=1' 'learning_mode=1' 'weight_decay=0' 'initialization=3'. nn_patchcolumn2d: out,in,patch_size>0,_overlap>=0 'patchcolumn2d' ( ) . : 'overlap=0'. nn_patchdown2d: out,in,_patch_size>1 'patchdown2d' ( ) . : 'patch_size=2'. nn_patchdown3d: out,in,_patch_size>1 'patchdown3d' ( ) . : 'patch_size=2'. nn_patchup2d: out,in,_patch_size>1 'patchup2d' ( ) . : 'patch_size=2'. nn_patchup3d: out,in,_patch_size>1 'patchup3d' ( ) . : 'patch_size=2'. nn_permute: out,in,permutation 'permute' ( ) . nn_print: . nn_rename: out,in 'rename' . nn_reshape: out,in,width>0,_height>0,_depth>0,_spectrum>0 'reshape' . : 'height=depth=spectrum=1'. nn_resize: out,in,width[%]>0,_height[%]>0,_depth[%]>0,_spectrum[%]>0,_interpolation 'resize' . 'interpolation' { -1:None (memory content) | 0:None | 1:Nearest | 2:Average | 3:Linear | 4=Grid | 5=Bicubic | 6=Lanczos } . : 'height=depth=spectrum=100%' 'interpolation=3'. nn_run: out,in,"command",_width[%]>0,_height[%]>0,_depth[%]>0,_spectrum[%]>0 'run' . : 'width=height=depth=spectrum=100%'. nn_save: 'filename.gmz',_include_trainer_data={ 0:No | 1:Yes } .gmz. '.gmz' . : 'include_trainer_data=1'. nn_size: ( ). nn_split: out0,out1,_out2,_out3,in,axis={ x | y | z | c },_size_out0>0,_size_out1>0,_size_out2>0,_size_out3>0 'split' . : 'size2=size1=size0'. nn_store: 'variable_name',_include_trainer_data={ 0:No | 1:Yes } . : 'include_trainer_data=1'. nn_sub: out,in0,in1 'sub' ( ) . 'in0' 'in1' ( ). nn_sum: out,in,_is_average={ 0:No | 1:Yes },_axis={ 0 | x | y | z | c } 'sum' ( ) . : 'is_average=0' 'axis=0'. nn_tmmul: out,in0,in1 'tmmul' ( 'in0^t.in1') . 'in0' 'in1' . nn_tmmult: out,in0,in1 'tmmult' ( 'in0^t.in1^t') . 'in0' 'in1' . nn_transpose: out,in 'transpose' ( ) . nn_trainer: out,loss,_optimizer,_"optimizer_params",_scheduler,_"scheduler_params" (trainer) . 'optimizer' { adam | adamax | dtschump | sgd | rmsprop } . 'scheduler' { constant | linear | exponential | adaptive } . * 'optimizer_params' : 'adam', 'adamax': (learning_rate,beta1,beta2,weight_decay,clip_gradient_min,clip_gradient_max). 'dtschump': ( learning_rate,momentum,weight_decay,clip_gradient_min,clip_gradient_max ). 'rmsprop': ( learning_rate,momentum,beta,weight_decay,clip_gradient_min,clip_gradient_max ). 'sgd': ( learning_rate,momentum,weight_decay,clip_gradient_min,clip_gradient_max ). * 'scheduler_params' : 'constant' : (none). 'adaptive' : ( lr_min,lr_max,nb_warmup_iterations,nb_cooldown_iterations,patience_down,factor_down,patience_up,factor_up ). : 'optimizer=adam' 'optimizer_params=(default)' 'scheduler=constant' 'scheduler_params=(default)'. nn_varname: layer_name . 11.15. (Arrays, Tiles and Frames) ------------------------ array: M>0,_N>0,_expand_type={ 0:Min | 1:Max | 2:All } MxN . : 'N=M' 'expand_type=0'. : [#1] image.jpg array 3,2,2 array_fade: M>0,_N>0,0<=_fade_start<=100,0<=_fade_end<=100,_expand_type={0:Min | 1:Max | 2:All} MxN . : 'N=M' 'fade_start=60' 'fade_end=90' 'expand_type=1'. : [#1] image.jpg array_fade 3,2 array_mirror: N>=0,_dir={ 0:X | 1:Y | 2:XY | 3:Tri-XY },_expand_type={ 0:No | 1:Yes } 2^Nx2^N . : 'dir=2' 'expand_type=0'. : [#1] image.jpg array_mirror 2 array_random: Ms>0,_Ns>0,_Md>0,_Nd>0 MdxNd MsxNs . : 'Ns=Ms' 'Md=Ms' 'Nd=Ns'. : [#1] image.jpg +array_random 8,8,15,10 frame: axes,size[%]>=0,_col1,...,_colN . 'axes' { x | y | z | xy | xz | yz | xyz } . : 'axes=xy' 'size=10%' 'col1=col2=col3=col4=255'. : [#1] image.jpg frame xy,10%,255,128,0 frame_blur: _sharpness>0,_size>=0,_smoothness,_shading,_blur RGBA . : 'sharpness=10' 'size=30' 'smoothness=0' 'shading=1' 'blur=3%'. : [#1] image.jpg frame_blur 3,30,8,10% frame_cube: _depth>=0,_centering_x,_centering_y,_left_side={ 0:Normal | 1:Mirror-X | 2:Mirror-Y | 3:Mirror-XY },_right_side,_lower_side,_upper_side . : 'depth=1' 'centering_x=centering_y=0' 'left_side=right_side,lower_side=upper_side=0'. : [#1] image.jpg frame_cube , frame_fuzzy: size_x[%]>=0,_size_y[%]>=0,_fuzziness>=0,_smoothness[%]>=0,_R,_G,_B,_A (fuzzy) RGBA . : 'size_y=size_x' 'fuzziness=5' 'smoothness=1' 'R=G=B=A=255'. : [#1] image.jpg frame_fuzzy 20 frame_painting: _size[%]>=0,0<=_contrast<=1,_profile_smoothness[%]>=0,_R,_G,_B,_vignette_size[%]>=0,_vignette_contrast>=0,_defects_contrast>=0, 0<=_defects_density<=100,_defects_size>=0,_defects_smoothness[%]>=0,_serial_number . : 'size=10%' 'contrast=0.4' 'profile_smoothness=6%' 'R=225' 'G=200' 'B=120' 'vignette_size=2%' 'vignette_contrast=400' 'defects_contrast=50' 'defects_density=10' 'defects_size=1' 'defects_smoothness=0.5%' 'serial_number=123456789'. : [#1] image.jpg frame_painting , frame_pattern: M>=3,_constrain_size={ 0:No | 1:Yes } | M>=3,_[frame_image],_constrain_size={ 0:No | 1:Yes } (pattern frame) . : 'pattern=0' 'constrain_size=0'. : [#1] image.jpg frame_pattern 8 frame_round: size_x[%]>=0,size_y[%]>=0,radius[%]>=0,_smoothness[%]>=0,_col1,...,_colN . : 'size_x=size_y=5%, 'radius=30%' 'smoothness=0' 'col=0,0,0,255'. frame_seamless: frame_size>=0,_patch_size>0,_blend_size>=0,_frame_direction={ 0:Inner (preserve image size) | 1:Outer } . : 'patch_size=7' 'blend_size=5' 'frame_direction=1'. : [#1] image.jpg +frame_seamless 30 array 2,2 img2ascii: _charset,_analysis_scale>0,_analysis_smoothness[%]>=0,_synthesis_scale>0,_output_ascii_filename (ascii art) . ( ) . : 'charset=[ascii charset]' 'analysis_scale=16' 'analysis_smoothness=20%' 'synthesis_scale=16' '_output_ascii_filename=[undefined]'. : [#1] image.jpg img2ascii , imagegrid: M>0,_N>0 MxN . : 'N=M'. : [#1] image.jpg imagegrid 16 imagegrid_hexagonal: _resolution>0,0<=_outline<=1 . : 'resolution=32' 'outline=0.1' 'is_antialiased=1'. : [#1] image.jpg imagegrid_hexagonal 24 imagegrid_triangular: pattern_width>=1,_pattern_height>=1,_pattern_type,0<=_outline_opacity<=1,_outline_color1,... . 'pattern type' { 0:Horizontal | 1:Vertical | 2:Crossed | 3:Cube | 4:Decreasing | 5:Increasing } . : 'pattern_width=24' 'pattern_height=pattern_width' 'pattern_type=0' 'outline_opacity=0.1' 'outline_color1=0'. : [#1] image.jpg imagegrid_triangular 6,10,3,0.5 map_sprites: _nb_sprites>=1,_allow_rotation={ 0:None | 1:90 deg. | 2:180 deg. } ( 'nb_sprites' ) . : [#1] image.jpg rescale2d ,48 repeat 16 ball {8+2*$>},${-rgb} mul[-1] {(1+$>)/16} done map_sprites 16 pack: is_ratio_constraint={ 0:No | 1:Yes },_sort_criterion . (x,y) . 'is_ratio_constraint' . : 'is_ratio_constraint=0' 'sort_criterion=max(w,h)'. : [#1] image.jpg repeat 10 +rescale2d[-1] 75% balance_gamma[-1] ${-rgb} done pack 0 puzzle: _width>0,_height>0,_M>=1,_N>=1,_curvature,_centering,_connectors_variability,_resolution>=1 . : 'width=height=512' 'M=N=5' 'curvature=0.5' 'centering=0.5' 'connectors_variability=0.5' 'resolution=64'. : [#1] puzzle ,rotate_tiles: angle,_M>0,N>0 MxN . : 'M=8' 'N=M'. : [#1] image.jpg to_rgba rotate_tiles 10,8 drop_shadow 10,10 display_rgba shift_tiles: M>0,_N>0,_amplitude MxN . : 'N=M' 'amplitude=20'. : [#1] image.jpg +shift_tiles 8,8,10 taquin: M>0,_N>0,_remove_tile={ 0:None | 1:First | 2:Last | 3:Random },_relief,_border_thickness[%],_border_outline[%],_outline_color () MxN . : 'N=M' 'relief=50' 'border_thickness=5' 'border_outline=0' 'remove_tile=0'. : [#1] image.jpg +taquin 8 tunnel: _level>=0,_factor>0,_centering_x,_centering_y,_opacity,_angle . : 'level=9' 'factor=80%' 'centering_x=centering_y=0.5' 'opacity=1' 'angle=0' : [#1] image.jpg tunnel 20 11.16. (Artistic) --------------------- boxfitting: _min_box_size>=1,_max_box_size>=0,_initial_density>=0,_min_spacing>0 : http://www.complexification.net/gallery/machines/boxFittingImg. : 'min_box_size=1' 'max_box_size=0' 'initial_density=0.25' 'min_spacing=1'. : [#1] image.jpg boxfitting , brushify: [brush],_brush_nb_sizes>=1,0<=_brush_min_size_factor<=1,_brush_nb_orientations>=1,_brush_light_type,0<=_brush_light_strength<=1,_brush_opacity, _painting_density[%]>=0,0<=_painting_contours_coherence<=1,0<=_painting_orientation_coherence<=1,_painting_coherence_alpha[%]>=0, _painting_coherence_sigma[%]>=0,_painting_primary_angle,0<=_painting_angle_dispersion<=1 . 'brush_light_type' { 0:None | 1:Flat | 2:Darken | 3:Lighten | 4:Full } . : 'brush_nb_sizes=3' 'brush_min_size_factor=0.66' 'brush_nb_orientations=12' 'brush_light_type=0' 'brush_light_strength=0.25' 'brush_opacity=0.8' 'painting_density=20%' 'painting_contours_coherence=0.9' 'painting_orientation_coherence=0.9' 'painting_coherence_alpha=1' 'painting_coherence_sigma=1' 'painting_primary_angle=0' 'painting_angle_dispersion=0.2' : [#1] image.jpg 40,40 gaussian[-1] 10,4 spread[-1] 10,0 brushify[0] [1],1 cartoon: _smoothness,_sharpening,_threshold>=0,_thickness>=0,_color>=0,quantization>0 . : 'smoothness=3' 'sharpening=150' 'threshold=20' 'thickness=0.25' 'color=1.5' 'quantization=8'. : [#1] image.jpg cartoon 3,50,10,0.25,3,16 color_ellipses: _count>0,_radius>=0,_opacity>=0 . : 'count=400' 'radius=5' 'opacity=0.1'. : [#1] image.jpg +color_ellipses ,,0.15 cubism: _density>=0,0<=_thickness<=50,_max_angle,_opacity,_smoothness>=0 . : 'density=50' 'thickness=10' 'max_angle=75' 'opacity=0.7' 'smoothness=0'. : [#1] image.jpg cubism , draw_whirl: _amplitude>=0 . : 'amplitude=100'. : [#1] image.jpg draw_whirl , drop_shadow: _offset_x[%],_offset_y[%],_smoothness[%]>=0,_curvature_x,_curvature_y,_expand_size={ 0:No | 1:Yes } . : 'offset_x=20' 'offset_y=offset_x' 'smoothness=5' 'curvature=0' 'expand_size=1'. : [#1] image.jpg drop_shadow 10,20,5,0.5 expand. xy,20 display_rgba drop_shadow: _offset_x[%],_offset_y[%],_smoothness[%]>=0,curvature_x>=0,curvature_y>=0,_expand_size={ 0:No | 1:Yes },_output_separate_layers={ 0:No | 1:Yes } . : 'offset_x=20' 'offset_y=offset_x' 'smoothness=5' 'curvature_x=curvature_y=0' 'expand_size=1' 'output_separate_layers=0'. : [#1] image.jpg drop_shadow 10,20,5,0.5 display_rgba ellipsionism: _R[%]>0,_r[%]>0,_smoothness[%]>=0,_opacity,_outline>0,_density>0 (Ellipsionism) . : 'R=10' 'r=3' 'smoothness=1%' 'opacity=0.7' 'outline=8' 'density=0.6'. : [#1] image.jpg ellipsionism , fire_edges: _edges>=0,0<=_attenuation<=1,_smoothness>=0,_threshold>=0,_nb_frames>0,_starting_frame>=0,frame_skip>=0 . : 'edges=0.7' 'attenuation=0.25' 'smoothness=0.5' 'threshold=25' 'nb_frames=1' 'starting_frame=20' 'frame_skip=0'. : [#1] image.jpg fire_edges , fractalize: 0<=detail_level<=1 . : 'detail_level=0.8' : [#1] image.jpg fractalize , glow: _amplitude>=0 . : 'amplitude=1%'. : [#1] image.jpg glow , halftone: nb_levels>=2,_size_dark>=2,_size_bright>=2,_shape={ 0:Square | 1:Diamond | 2:Circle | 3:inv-square | 4:inv-diamond | 5:inv-circle },_smoothness[%]>=0 (halftone dithering) . : 'nb_levels=5' 'size_dark=8' 'size_bright=8' 'shape=5' 'smoothness=0'. : [#1] image.jpg halftone , hardsketchbw: _amplitude>=0,_density>=0,_opacity,0<=_edge_threshold<=100,_is_fast={ 0:No | 1:Yes } . : 'amplitude=1000' 'sampling=3' 'opacity=0.1' 'edge_threshold=20' 'is_fast=0'. : [#1] image.jpg +hardsketchbw 200,70,0.1,10 median[-1] 2 +local reverse blur[-1] 3 blend[-2,-1] overlay done hearts: _density>=0 . : 'density=10'. : [#1] image.jpg hearts , houghsketchbw: _density>=0,_radius>0,0<=_threshold<=100,0<=_opacity<=1,_votesize[%]>0 (Hough) . : 'density=100' 'radius=3' 'threshold=100' 'opacity=0.1' 'votesize=100%'. : [#1] image.jpg +houghsketchbw , lightrays: 100<=_density<=0,_center_x[%],_center_y[%],_ray_length>=0,_ray_attenuation>=0 . : 'density=50%' 'center_x=50%' 'center_y=50%' 'ray_length=0.9' 'ray_attenuation=0.5'. : [#1] image.jpg +lightrays , + cut 0,255 light_relief: _ambient_light,_specular_lightness,_specular_size,_darkness,_light_smoothness,_xl,_yl,_zl,_zscale,_opacity_is_heightmap={ 0:No | 1:Yes } . : 'ambient_light=0.3' 'specular_lightness=0.5' 'specular_size=0.2' 'darkness=0' 'xl=0.2' 'yl=zl=0.5' 'zscale=1' 'opacity=1' 'opacity_is_heightmap=0'. : [#1] image.jpg blur 2 light_relief 0.3,4,0.1,0 linify: 0<=_density<=100,_spreading>=0,_resolution[%]>0,_line_opacity>=0,_line_precision>0,_mode={ 0:Subtractive | 1:Additive } (Linify) . http://linify.me/about . : 'density=50' 'spreading=2' 'resolution=40%' 'line_opacity=10' 'line_precision=24' 'mode=0'. : [#1] image.jpg linify 60 mosaic: 0<=_density<=100 . : 'density=30'. : [#1] image.jpg mosaic , +fill "I!=J(1) || I!=J(0,1)?[0,0,0]:I" old_photo: . : [#1] image.jpg old_photo pencilbw: _size>=0,_amplitude>=0 . : 'size=0.3' 'amplitude=60'. : [#1] image.jpg pencilbw , pixelsort: _ordering={ +:Increasing | -:Decreasing },_axis={ x | y | z | xy | yx },_[sorting_criterion],_[mask] <> : http://satyarth.me/articles/pixel-sorting. : 'ordering=+' 'axis=x' 'sorting_criterion=mask=(undefined)'. : [#1] image.jpg +norm +ge[-1] 30% +pixelsort[0] +,y,[1],[2] polaroid: _size1>=0,_size2>=0 . : 'size1=10' 'size2=20'. : [#1] image.jpg to_rgba polaroid 5,30 rotate 20 drop_shadow , drgba polygonize: _warp_amplitude>=0,_smoothness[%]>=0,_min_area[%]>=0,_resolution_x[%]>0,_resolution_y[%]>0 (polygon) . : 'warp_amplitude=300' 'smoothness=2%' 'min_area=0.1%' 'resolution_x=resolution_y=10%'. : [#1] image.jpg +polygonize 100,10 fill[-1] "I!=J(1) || I!=J(0,1)?[0,0,0]:I" poster_edges: 0<=_edge_threshold<=100,0<=_edge_shade<=100,_edge_thickness>=0,_edge_antialiasing>=0,0<=_posterization_level<=15,_posterization_antialiasing>=0 . : 'edge_threshold=40' 'edge_shade=5' 'edge_thickness=0.5' 'edge_antialiasing=10' 'posterization_level=12' 'posterization_antialiasing=0'. : [#1] image.jpg poster_edges , poster_hope: _smoothness>=0 Hope . : 'smoothness=3'. : [#1] image.jpg poster_hope , rodilius: 0<=_amplitude<=100,_0<=thickness<=100,_sharpness>=0,_nb_orientations>0,_offset,_color_mode={ 0:Darker | 1:Brighter } rodilius ( fractalius) . : 'amplitude=10' 'thickness=10' 'sharpness=400' 'nb_orientations=7' 'offset=0' 'color_mode=1'. : [#1] image.jpg rodilius 12,10,300,10 normalize_local 10,6 [#2] image.jpg normalize_local 10,16 rodilius 10,4,400,16 smooth 60,0,1,1,4 normalize_local 10,16 sketchbw: _nb_angles>0,_start_angle,_angle_range>=0,_length>=0,_threshold>=0,_opacity,_bgfactor>=0,_density>0,_sharpness>=0,_anisotropy>=0,_smoothness>=0, _coherence>=0,_is_boost={ 0:No | 1:Yes },_is_curved={ 0:No | 1:Yes } (sketch) . : 'nb_angles=2' 'start_angle=45' 'angle_range=180' 'length=30' 'threshold=3' 'opacity=0.03' 'bgfactor=0' 'density=0.6' 'sharpness=0.1' 'anisotropy=0.6' 'smoothness=0.25' 'coherence=1' 'is_boost=0' 'is_curved=1'. : [#1] image.jpg +sketchbw 1 reverse blur[-1] 3 blend[-2,-1] overlay sponge: _size>0 . : 'size=13'. : [#1] image.jpg sponge , stained_glass: _edges[%]>=0, shading>=0, is_thin_separators={ 0:No | 1:Yes } (stained glass) . : 'edges=40%' 'shading=0.2' 'is_precise=0'. : [#1] image.jpg stained_glass 20%,1 cut 0,20 stars: _density[%]>=0,_depth>=0,_size>0,_nb_branches>=1,0<=_thickness<=1,_smoothness[%]>=0,_R,_G,_B,_opacity . : 'density=10%' 'depth=1' 'size=32' 'nb_branches=5' 'thickness=0.38' 'smoothness=0.5' 'R=G=B=200' 'opacity=1'. : [#1] image.jpg stars , stencil: _radius[%]>=0,_smoothness>=0,_iterations>=0 (stencil) . : 'radius=3' 'smoothness=1' 'iterations=8'. : [#1] image.jpg +norm stencil. 2,1,4 +mul rm[0] stencilbw: _edges>=0,_smoothness>=0 . : 'edges=15' 'smoothness=10'. : [#1] image.jpg +stencilbw 40,4 stylize: [style_image],_fidelity_finest,_fidelity_coarsest,_fidelity_smoothness_finest>=0,_fidelity_smoothnes_coarsest>=0,0<=_fidelity_chroma<=1,_init_type, _init_resolution>=0,init_max_gradient>=0,_patch_size_analysis>0,_patch_size_synthesis>0,_patch_size_synthesis_final>0,_nb_matches_finest>=0, _nb_matches_coarsest>=0,_penalize_repetitions>=0,_matching_precision>=0,_scale_factor>1,_skip_finest_scales>=0,_"image_matching_command" (style) (multi-scale patch-matching). window[0] . 'init_type' { 0:Best-match | 1:Identity | 2:Randomized } . : 'fidelity_finest=0.5' 'fidelity_coarsest=2' 'fidelity_smoothness_finest=3' 'fidelity_smoothness_coarsest=0.5' 'fidelity_chroma=0.1' 'init_type=0' 'init_resolution=16' 'init_max_gradient=0' 'patch_size_analysis=5' 'patch_size_synthesis=5' 'patch_size_synthesis_final=5' 'nb_matches_finest=2' 'nb_matchesc_coarsest=30' 'penalize_repetitions=2' 'matching_precision=2' 'scale_factor=1.85' 'skip_finest_scales=0' 'image_matching_command'="s c,-3 transfer_pca[0] [2] b[0,2] xy,0.7 n[0,2] 0,255 n[1, 2] 0,200 a[0,1] c a[1,2] c"'. tetris: _scale>0 . : 'scale=10'. : [#1] image.jpg +tetris 10 warhol: _M>0,_N>0,_smoothness>=0,_color>=0 MxN . : 'M=3' 'N=M' 'smoothness=2' 'color=20'. : [#1] image.jpg warhol 3,3,3,40 weave: _density>=0,0<=_thickness<=100,0<=_shadow<=100,_shading>=0,_fibers_amplitude>=0,_fibers_smoothness>=0,_angle,-1<=_x_curvature<=1,-1<=_y_curvature<=1 (weave) . 'angle' { 0:0 deg. | 1:22.5 deg. | 2:45 deg. | 3:67.5 deg. } . : 'density=6' 'thickness=65' 'shadow=40' 'shading=0.5' 'fibers_amplitude=0' _'fibers_smoothness=0' 'angle=0' 'curvature_x=curvature_y=0' : [#1] image.jpg weave , whirls: _texture>=0,_smoothness>=0,_darkness>=0,_lightness>=0 (whirl) . : 'texture=3' 'smoothness=6' 'darkness=0.5' 'lightness=1.8'. : [#1] image.jpg whirls , 11.17. (Warpings) -------- deform: _amplitude[%]>=0,_interpolation,_boundary_conditions . 'interpolation' { 0:None | 1:Linear | 2:Bicubic } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'amplitude=10' 'interpolation=1' 'boundary_conditions=3'. : [#1] image.jpg +deform[0] 10 +deform[0] 20 euclidean2polar: _center_x[%],_center_y[%],_stretch_factor>0,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'center_x=center_y=50%' 'stretch_factor=1' 'boundary_conditions=3'. : [#1] image.jpg +euclidean2polar , equirectangular2nadirzenith: (equirectangular) nadir/zenith. fisheye: _center_x,_center_y,0<=_radius<=100,_amplitude>=0 (fisheye) . : 'x=y=50' 'radius=50' 'amplitude=1.2'. : [#1] image.jpg +fisheye , flower: _amplitude,_frequency,_offset_r[%],_angle,_center_x[%],_center_y[%],_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } (flower deformation) . : 'amplitude=30' 'frequency=6' 'offset_r=0' 'angle=0' 'center_x=center_y=50%' 'boundary_conditions=3'. : [#1] image.jpg +flower , kaleidoscope: _center_x[%],_center_y[%],_radius,_angle,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } (kaleidoscope) . : 'center_x=center_y=50%' 'radius=100' 'angle=30' 'boundary_conditions=3'. : [#1] image.jpg kaleidoscope , map_sphere: _width>0,_height>0,_radius,_dilation>0,_fading>=0,_fading_power>=0 . : 'width=height=512' 'radius=100' 'dilation=0.5' 'fading=0' 'fading_power=0.5'. : [#1] image.jpg map_sphere , nadirzenith2equirectangular: / (nadir/zenith rectilinear) (equirectangular). polar2euclidean: _center_x[%],_center_y[%],_stretch_factor>0,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'center_x=center_y=50%' 'stretch_factor=1' 'boundary_conditions=3'. : [#1] image.jpg +euclidean2polar , raindrops: _amplitude,_density>=0,_wavelength>=0,_merging_steps>=0 . : 'amplitude=80' 'density=0.1' 'wavelength=1' 'merging_steps=0'. : [#1] image.jpg +raindrops , ripple: _amplitude,_bandwidth,_shape={ 0:Block | 1:Triangle | 2:Sine | 3:Sine+ | 4:Random },_angle,_offset (ripple) . : 'amplitude=10' 'bandwidth=10' 'shape=2' 'angle=0' 'offset=0'. : [#1] image.jpg +ripple , rotoidoscope: _center_x[%],_center_y[%],_tiles>0,_smoothness[%]>=0,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'center_x=center_y=50%' 'tiles=10' 'smoothness=1' 'boundary_conditions=3'. : [#1] image.jpg +rotoidoscope , spherize: _radius[%]>=0,_strength,_smoothness[%]>=0,_center_x[%],_center_y[%],_ratio_x/y>0,_angle,_interpolation (spherize) . : 'radius=50%' 'strength=1' 'smoothness=0' 'center_x=center_y=50%' 'ratio_x/y=1' 'angle=0' 'interpolation=1'. : [#1] image.jpg grid 5%,5%,0,0,0.6,255 spherize , symmetrize: _x[%],_y[%],_angle,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror },_is_antisymmetry={ 0:No | 1:Yes },_swap_sides={ 0:No | 1:Yes } . : 'x=y=50%' 'angle=90' 'boundary_conditions=3' 'is_antisymmetry=0' 'swap_sides=0'. : [#1] image.jpg +symmetrize 50%,50%,45 +symmetrize[-1] 50%,50%,-45 transform_polar: "expr_radius",_"expr_angle",_center_x[%],_center_y[%],_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'expr_radius=R-r' 'expr_rangle=a' 'center_x=center_y=50%' 'boundary_conditions=3'. : [#1] image.jpg +transform_polar[0] R*(r/R)^2,a +transform_polar[0] r,2*a twirl: _amplitude,_center_x[%],_center_y[%],_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } (twirl) . : 'amplitude=1' 'center_x=center_y=50%' 'boundary_conditions=3'. : [#1] image.jpg twirl 0.6 warp (+): [warping_field],_mode,_interpolation,_boundary_conditions,_nb_frames>0 . 'mode' { 0:Backward-absolute | 1:Backward- relative | 2:Forward-absolute | 3:Forward-relative } . 'interpolation' { 0:Nearest-neighbor | 1:Linear | 2:Cubic } . 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'mode=0' 'interpolation=1' 'boundary_conditions=0' 'nb_frames=1'. : [#1] image.jpg 100%,100%,1,2,'X=x/w-0.5;Y=y/h-0.5;R=(X*X+Y*Y)^0.5;A=atan2(Y,X);130*R*(!c?cos(4*A):sin(8*A))' warp[-2] [-1],1,1,0 quiver[-1] [-1], 10,1,1,1,100 : https://gmic.eu/oldtutorial/_warp warp_patch: [displacement_map],patch_width>=1,_patch_height>=1,_patch_depth>=1,_std_factor>0,_boundary_conditions,_fast_approximation={ 0:No | 1:Yes } (patch-warp) ( backward-absolute). 'std_factor' 'std = std_factor*patch_size'. 'boundary_conditions' { 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'std_factor=0.3' 'boundary_conditions=3' 'fast_approximation=0'. warp_perspective: _x-angle,_y-angle,_zoom>0,_x-center,_y- center,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'x-angle=1.5' 'y- angle=0' 'zoom=1' 'x-center=y-center=50' 'boundary_conditions=2'. : [#1] image.jpg warp_perspective , warp_rbf: xs0[%],ys0[%],xt0[%],yt0[%],...,xsN[%],ysN[%],xtN[%],ytN[%] RBF. (xsk,ysk)-(xtk,ytk) . . : [#1] image.jpg +warp_rbf 0,0,0,0,100%,0,100%,0,100%,100%,100%,100%,0,100%,0,100%,50%,50%,70%,50%,25%,25%,25%,75% warp_seamless: [displacement_map],_sigma[%]>0,_blend_dimension={ 0:Auto | 1:1D | 2:2D | 3:3D } (seamless blending). : 'sigma=5%' 'blend_dimension=0'. : [#1] sp colorful,512 100%,100%,1,2,[x,y] l. { s xy,8 sort_list +,u append_tiles , } +warp[0] [1] +warp_seamless[0] [1] water: _amplitude,_smoothness>=0,_angle . : 'amplitude=30' 'smoothness=1.5' 'angle=45'. : [#1] image.jpg water , wave: _amplitude>=0,_frequency>=0,_center_x,_center_y . : 'amplitude=4' 'frequency=0.4' 'center_x=center_y=50'. : [#1] image.jpg wave , wind: _amplitude>=0,_angle,0<=_attenuation<=1,_threshold . : 'amplitude=20' 'angle=0' 'attenuation=0.7' 'threshold=20'. : [#1] image.jpg +wind , zoom: _factor,_cx,_cy,_cz,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } . : 'factor=1' 'cx=cy=cz=0.5' 'boundary_conditions=0'. : [#1] image.jpg +zoom[0] 0.6 +zoom[0] 1.5 11.18. (Degradations) ---------------------------- cracks: 0<=_density<=100,_is_relief={ 0:No | 1:Yes },_opacity,_color1,... . : 'density=25' 'is_relief=0' 'opacity=1' 'color1=0'. : [#1] image.jpg +cracks , light_patch: _density>0,_darkness>=0,_lightness>=0 . : 'density=10' 'darkness=0.9' 'lightness=1.7'. : [#1] image.jpg +light_patch 20,0.9,4 pixelate: _scale_x>0,_scale_y>0,_scale_z>0 . : 'scale_x=20' 'scale_y=scale_z=scale_x'. : [#1] image.jpg +pixelate , scanlines: _amplitude,_bandwidth,_shape={ 0:Block | 1:Triangle | 2:Sine | 3:Sine+ | 4:Random },_angle,_offset (scanlines) . : 'amplitude=60' 'bandwidth=2' 'shape=0' 'angle=0' 'offset=0'.: [#1] image.jpg +scanlines , shade_stripes: _frequency>=0,_direction={ 0:Horizontal | 1:Vertical },_darkness>=0,_lightness>=0 . : 'frequency=5' 'direction=1' 'darkness=0.8' 'lightness=2'. : [#1] image.jpg +shade_stripes 30 shadow_patch: _opacity>=0 . : 'opacity=0.7'. : [#1] image.jpg +shadow_patch 0.4 shuffle: Fisher- Yates https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle . : [#1] uniform_distribution 8,3 shuffle spread: _dx[%]>=0,_dy[%]>=0,_dz[%]>=0 x y z. : 'dx=3' 'dy=dx' 'dz=0'. : [#1] image.jpg +spread 3 stripes_y: _frequency>=0 . : 'frequency=10'. : [#1] image.jpg +stripes_y , texturize_canvas: _amplitude>=0,_fibrousness>=0,_emboss_level>=0 . : 'amplitude=20' 'fibrousness=3' 'emboss_level=0.6'. : [#1] image.jpg +texturize_canvas , texturize_paper: . : [#1] image.jpg +texturize_paper vignette: _strength>=0,0<=_radius_min<=100,0<=_radius_max<=100 ( ) . : 'strength=100' 'radius_min=70' 'radius_max=90'. : [#1] image.jpg vignette , watermark_visible: _text,0<_opacity<1,_{ size>0 | font },_angle,_mode={ 0:Remove | 1:Add },_smoothness>=0 ( [0,255] ). : 'text=(c) G'MIC' 'opacity=0.3' 'size=53' 'angle=25' 'mode=1' 'smoothness=0'. : [#1] image.jpg watermark_visible ,0.7 11.19. (Blending and Fading) ------------------------------------- blend: [layer],blending_mode,_opacity[%],_selection_is={ 0:Base-layers | 1:Top-layers } | blending_mode,_opacity[%] G GA RGB RGBA . 'blending_mode' : { add | alpha | and | average | blue | burn | darken | difference | divide | dodge | edges | exclusion | freeze | grainextract | grainmerge | green | hardlight | hardmix | hue | interpolation | lchlightness | lighten | lightness | linearburn | linearlight | luminance | multiply | negation | or | overlay | pinlight | red | reflect | saturation | screen | seamless | seamless_mixed | shapeareamax | shapeareamax0 | shapeareamin | shapeareamin0 | shapeaverage | shapeaverage0 | shapemedian | shapemedian0 | shapemin | shapemin0 | shapemax | shapemax0 | shapeprevalent | softburn | softdodge | softlight | stamp | subtract | value | vividlight | xor }. 'opacity' '[0,1]' ( '[0%,100%]') . : 'blending_mode=alpha' 'opacity=1' 'selection_is=0'. : [#1] image.jpg +drop_shadow , rescale2d[-1] ,200 rotate[-1] 20 +blend alpha display_rgba[-2] [#2] image.jpg testimage2d {w},{h} blend overlay [#3] command "ex : $""=arg repeat $""# +blend[0,1] ${arg{$>+1}} text_outline[-1] Mode: testimage2d {w},{h} ex add,alpha,and,average,blue,burn,darken [#4] command "ex : $""=arg repeat $""# +blend[0,1] ${arg{$>+1}} text_outline[-1] Mode: testimage2d {w},{h} ex difference,divide,dodge,exclusion,freeze,grainextract,grainmerge [#5] command "ex : $""=arg repeat $""# +blend[0,1] ${arg{$>+1}} text_outline[-1] Mode: testimage2d {w},{h} ex green,hardlight,hardmix,hue,interpolation,lighten,lightness [#6] command "ex : $""=arg repeat $""# +blend[0,1] ${arg{$>+1}} text_outline[-1] Mode: testimage2d {w},{h} ex linearburn,linearlight,luminance,multiply,negation,or,overlay [#7] command "ex : $""=arg repeat $""# +blend[0,1] ${arg{$>+1}} text_outline[-1] Mode: testimage2d {w},{h} ex pinlight,red,reflect,saturation,screen,shapeaverage,softburn [#8] command "ex : $""=arg repeat $""# +blend[0,1] ${arg{$>+1}} text_outline[-1] Mode: testimage2d {w},{h} ex softdodge,softlight,stamp,subtract,value,vividlight,xor nblend: [layer],blending_mode,_opacity[%],_selection_is={ 0:Base-layers | 1:Top-layers } | blending_mode,_opacity[%] blend_edges: smoothness[%]>=0 'edges'. : [#1] image.jpg testimage2d {w},{h} +blend_edges 0.8 blend_fade: [fading_shape] . : [#1] image.jpg testimage2d {w},{h} 100%,100%,1,1,'cos(y/10)' normalize[-1] 0,1 +blend_fade[0,1] [2] blend_median: 'median'. : [#1] image.jpg testimage2d {w},{h} +mirror[0] y +blend_median blend_seamless: _is_mixed_mode={ 0:No | 1:Yes },_inner_fading[%]>=0,_outer_fading[%]>=0 ( ). : 'is_mixed=0' 'inner_fading=0' 'outer_fading=100%'. fade_diamond: 0<=_start<=100,0<=_end<=100 . : 'start=80' 'end=90'. : [#1] image.jpg testimage2d {w},{h} +fade_diamond 80,85 fade_linear: _angle,0<=_start<=100,0<=_end<=100 . : 'angle=45' 'start=30' 'end=70'. : [#1] image.jpg testimage2d {w},{h} +fade_linear 45,48,52 fade_radial: 0<=_start<=100,0<=_end<=100 . : 'start=30' 'end=70'. : [#1] image.jpg testimage2d {w},{h} +fade_radial 30,70 fade_x: 0<=_start<=100,0<=_end<=100 . : 'start=30' 'end=70'. : [#1] image.jpg testimage2d {w},{h} +fade_x 30,70 fade_y: 0<=_start<=100,0<=_end<=100 . : 'start=30' 'end=70'. : [#1] image.jpg testimage2d {w},{h} +fade_y 30,70 fade_z: 0<=_start<=100,0<=_end<=100 . : 'start=30' 'end=70'. sub_alpha: [base_image],0<=_minimize_alpha<=1 ( ) . A-B (opacity) '' alpha_blend(B,A-B) = A . 'minimize_alpha' . '1' . '0' ( '255'). : 'minimize_alpha=1'. : [#1] image.jpg testimage2d {w},{h} +sub_alpha[0] [1] display_rgba 11.20. (Image Sequences and Videos) ----------------------------------------------------- animate: filter_name,"param1_start,...,paramN_start","param1_end,...,paramN_end",nb_frames>=0,_output_frames={ 0:No | 1:Yes },_output_filename | delay>0,_back and forth={ 0:No | 1:Yes } . : 'delay=30'. : [#1] image.jpg animate flower,"0,3","20,8",9 apply_camera: _"command",_camera_index>=0,_skip_frames>=0,_output_filename [0]. OpenCV ( G'MIC ). : 'command=""' 'camera_index=0' ( ) 'skip_frames=0' 'output_filename=""'.apply_files: "filename_pattern",_"command",_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename G'MIC . . '.avi' '.mp4' ( ) ( ) . : 'command=(undefined)' 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. apply_video: video_filename,_"command",_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename G'MIC . . '.avi' '.mp4' ( ) ( ) . OpenCV ( G'MIC ). : 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. average_files: "filename_pattern",_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename . . '.avi' '.mp4' ( ) ( ) . : 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. average_video: video_filename,_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename . . '.avi' '.mp4' ( ) ( ) . OpenCV ( G'MIC ). : 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. fade_files: "filename_pattern",_nb_inner_frames>0,_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename (temporal fading) . . 'avi' 'mp4' ( ) ( ) . : 'nb_inner_frames=10' 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. fade_video: video_filename,_nb_inner_frames>0,_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename . . OpenCV ( G'MIC ). : 'nb_inner_frames=10' 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. files2video: "filename_pattern",_output_filename,_fps>0,_codec . : 'output_filename=output.mp4' 'fps=25' 'codec=mp4v'. median_files: "filename_pattern",_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_frame_rows[%]>=1,_is_fast_approximation={ 0:No | 1:Yes } (median) . . : 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'frame_rows=20%' 'is_fast_approximation=0'. median_video: video_filename,_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_frame_rows[%]>=1,_is_fast_approximation={ 0:No | 1:Yes } . . OpenCV ( G'MIC ). : 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'frame_rows=100%' 'is_fast_approximation=1'. morph: nb_inner_frames>=1,_smoothness>=0,_precision>=0 (morphing) . : 'smoothness=0.1' 'precision=7'. : [#1] image.jpg +rotate 20,1,1,50%,50% morph 9 morph_files: "filename_pattern",_nb_inner_frames>0,_smoothness>=0,_precision>=0,_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename (temporal morphing) . . '.avi' '.mp4' ( ) ( ) . : 'nb_inner_frames=10' 'smoothness=0.1' 'precision=7' 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. morph_rbf: nb_inner_frames>=1,xs0[%],ys0[%],xt0[%],yt0[%],...,xsN[%],ysN[%],xtN[%],ytN[%] RBF. (xsk,ysk)-(xtk,ytk) . . morph_video: video_filename,_nb_inner_frames>0,_smoothness>=0,_precision>=0,_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1,_output_filename . . '.avi' '.mp4' ( ) ( ) . OpenCV ( G'MIC ). : 'nb_inner_frames=10' 'smoothness=0.1' 'precision=7' 'first_frame=0' 'last_frame=-1' 'frame_step=1' 'output_filename=(undefined)'. register_nonrigid: [destination],_smoothness>=0,_precision>0,_nb_scale>=0 (non-rigid warp). : 'smoothness=0.2' 'precision=7' 'nb_scale=0(auto)'. : [#1] image.jpg +rotate 20,1,1,50%,50% +register_nonrigid[0] [1] register_rigid: [destination],_smoothness>=0,_boundary_conditions={ 0:Dirichlet | 1:Neumann | 2:Periodic | 3:Mirror } (). : 'smoothness=0.1%' 'boundary_conditions=0'. : [#1] image.jpg +shift 30,20 +register_rigid[0] [1] transition: [transition_shape],nb_added_frames>=0,100>=shading>=0,_single_frame_only={ -1:Disabled | >=0 } (transition) . : 'shading=0' 'single_frame_only=-1'. : [#1] image.jpg +mirror c 100%,100% plasma[-1] 1,1,6 transition[0,1] [2],5 transition3d: _nb_frames>=2,_nb_xtiles>0,_nb_ytiles>0,_axis_x,_axis_y,_axis_z,_is_antialias={ 0:No | 1:Yes } . 'axis_x' 'axis_y' 'axis_z' 'x' 'y' . : 'nb_frames=10' 'nb_xtiles=nb_ytiles=3' 'axis_x=1' 'axis_y=1' 'axis_z=0' 'is_antialias=1'. : [#1] image.jpg +blur 5 transition3d 9 display_rgba video2files: input_filename,_output_filename,_first_frame>=0,_last_frame={ >=0 | -1:Last },_frame_step>=1 . . : 'output_filename=frame.png' 'first_frame=0' 'last_frame=-1' 'frame_step=1'. 11.21. (Convenience Functions) ------------------------------------- add_copymark: copymark . alert: _title,_message,_label_button1,_label_button2,... . . : 'title=[G'MIC Alert]' 'message=This is an alert box.'. arg0: n>=0,_arg_0,...,_arg_N n- ( 'n' '0' 'N' ). arg1: n>=1,_arg_1,...,_arg_N n- ( 'n' '1' 'N' ). arg2var: variable_name,argument_1,...,argument_N i [1...N] 'variable_name$i=argument_i' . (global) ( ). average_vectors: . base642img: "base64_string" base64 . 'img2base64' . base642uint8: "base64_string" base64 . 'uint82base64' . basename: file_path,_variable_name_for_folder (basename) . 'variable_name_for_folder' ( ). bin: binary_int1,... . bin2dec: binary_int1,... . cat: filename,_display_line_numbers={ 0:No | 1:Yes },_line_selection, (stdout). : 'display_line_numbers=1' 'line_selection=^'.color2name: R,G,B ( ) . covariance_vectors: _avg_outvarname ( ). 'avg_outvarname' . da_freeze: - . date: 'YYYY/MM/DD' . dec: decimal_int1,... . dec2str: decimal_int1,... . dec2bin: decimal_int1,... . dec2hex: decimal_int1,... . dec2oct: decimal_int1,... . filename: filename,_number1,_number2,...,_numberN . filename_rand: . filename_dated: filename ('filename_YYYYMMDD_HHMMSS.ext'). files (+): _mode,path / . 'path' . 'mode' { 0:Files only | 1:Directories only | 2:Files + Directories } . '3' 'mode' . : 'mode=5'. files2img: _mode,path files . G'MIC ( ) . fitratio_wh: min_width,min_height,ratio_wh 'width,height' 'min_width,min_height' w/h . fitscreen: width,height,_minimal_size[%]>0,_maximal_size[%]>0 | [image],_minimal_size[%]>0,_maximal_size[%]>0 <> WxH . : 'depth=1' 'minimal_size=128' 'maximal_size=85%'. fontchart: display_mode. G'MIC . 'display_mode' { 0: List of characters | N: List of fonts with height 'N'} . : 'display_mode=0'. : [#1] fontchart 0 fontchart 64 fps: -1 . . hex: hexadecimal_int1,... . hex2dec: hexadecimal_int1,... . hex2img: "hexadecimal_string" 1xN . hex2str: hexadecimal_string . : str2hex. img2base64: _encoding={ 0:Base64 | 1:Base64url },_store_names={ 0:No | 1:Yes } base64 . 'base642img' . : 'encoding=0' 'store_names=1'. img2hex: . [0,255] . img2str: G'MIC . indexof: string,_arg_0,...,_arg_N 'i' 'arg_i==string' . 'arg_i' '-1' . is_mesh3d: 1 0 . is_change: _value={ 0:False | 1:True } 'is_change' . . : 'value=1'. is_half: half-float 1 . is_ext: filename,_extension 1 . is_image_arg: string '[ind]' 1 . is_pattern: string '0x......' 1 . is_videofilename: filename 1 . is_macos: Darwin (MacOS) 1 0 . is_windows: Windows 1 0 . lof: feature ( ) . math_lib: . mad: MAD ( ) . MAD MAD = med_i|x_i- med_j(x_j)| max_w: . max_h: . max_d: . max_s: . max_wh: wxh . max_ds: dxs . max_whd: wxhxd . max_whds: wxhxdxs . median_vectors: ( ) min_w: . min_h: .min_d: . min_s: s . min_wh: wxh . min_ds: dxs . min_whd: wxhxd . min_whds: wxhxdxs . name2color: name R,G,B . nmd (+): 'named'. named (+): _mode,"name1","name2",... . (status) ( ) ( ). ( 'nmd'). 'mode' { 0:All indices (default) | 1:Lowest index | 2:Highest index | 3:All indices (case insensitive) | 4:Lowest index (case insensitive) | 5:Highest index (case insensitive)} . narg: arg_1,arg_2,...,arg_N . normalize_filename: filename <<>> . oct: octal_int1,... (octal) . oct2dec: octal_int1,... (octal) . path_cache: G'MIC ( ). path_cached_file: "filename" "" . path_current: G'MIC . path_gimp: GIMP ( ). path_tmp: ( ). remove_copymark: copymark . reset: . shell_cols: (shell) . size_value: ( ) . std_noise: . str: string . strbuffer: buffer_size . str2hex: "string" ( ). : hex2str. : [#1] hex=${"str2hex [gmic]-0./ Start G'MIC interpreter. [gmic]-0./ 48656c6c6f206d7920667269656e6473 [gmic]-0./ End G'MIC interpreter. strcapitalize: string . strcontains: string1,string2 1 . strclut: "string" CLUT . strlen: string1 . strlowercase: string . strreplace: string,search,replace . struppercase: string . strvar: "string" . ( ). strcasevar: "string" . ( ). strver: _version,_prerelease G'MIC . : 'version=$_version' 'prerelease='. tic: tic-toc. 'toc' . time: 'hh:mm:ss'. toc: tic-toc 'tic'. (status) . 'tic' . uint82base64: _encoding={ 0:Base64 | 1:Base64url } base64. 'base642uint8' . [0,255] . : 'encoding=0'. 11.22. (Other Interactive Commands) ----------------------------------------------------- demos: _run_in_parallel={ 0:No | 1:Yes | 2:Auto } G'MIC. x_2048: 2048. x_blobs: (blobs). ../img/x_blobs.jpg [image: 'x_blobs'] x_bouncing: . x_color_curves: _colorspace={ rgb | cmy | cmyk | hsi | hsl | hsv | lab | lch | ycbcr | last } RGB[A] . 'colorspace' 'last' . : 'colorspace=rgb'. x_colorize: _is_lineart={ 0:No | 1:Yes },_max_resolution={ 0 | >=128 },_multichannels_output={ 0:No | 1:Yes },_[palette1],_[palette2],_[grabber1] . 0< 'max_resolution' . : 'is_lineart=1' 'max_resolution=1024' 'multichannels_output=0'. x_connect4: Connect Four. xz: 'x_crop'.x_crop: . . ( 'xz'). x_cut: . x_fire: . x_fireworks: . x_fisheye: . x_fourier: . x_grab_color: _variable_name ( ) . 'variable_name' . '-1' . : 'variable_name=xgc_variable'. x_hanoi: . x_histogram: (). x_hough: . x_jawbreaker: 0<_width<20,0<_height<20,0<_nb_colors<=8 Jawbreaker. : 'width=12' 'height=13' 'nb_colors=5'. x_landscape: . x_life: (game of life). x_light: . x_mandelbrot: _is_julia={ 0:No | 1:Yes },_c0r,_c0i /. x_mask_color: _colorspace={ all | rgb | lrgb | ycbcr | lab | lch | hsv | hsi | hsl | cmy | cmyk | yiq },_spatial_tolerance>=0,_color_tolerance>=0 . 'colorspace' { rgb | lrgb | ycbcr | lab | lch | hsv | hsi | hsl | cmy | cmyk | yiq } . 'colorspace' 'colorspace_channel' ( 'hsv_h' ). : 'colorspace=all' 'spatial_tolerance=5' 'color_tolerance=5'. x_metaballs3d: . x_minesweeper: 8<=_width<=20,8<=_height<=20 (Minesweeper). x_minimal_path: . x_morph: _nb_frames>=2,_preview_fidelity={ 0:Coarsest | 1:Coarse | 2:Normal | 3:Fine | 4:Finest } (image morpher). : 'nb_frames=16' 'preview_fidelity=3'. x_pacman: (pacman). x_paint: . x_plasma: . x_quantize_rgb: _nbcolors>=2 RGB. x_reflection3d: . x_rubber3d: . x_segment: _max_resolution={ 0:Auto | >=128 } RGB . RGBA . : 'max_resolution=1024'. x_select_color: _variable_name RGB RGBA. 'variable_name' ( R,G,B,[A]) . . '-1' . : 'variable_name=xsc_variable'. x_select_function1d: _variable_name,_background_curve_R,_background_curve_G,_background_curve_B . : - ( ). - R,G,B X Y . 'variable_name' . '-1' . : 'variable_name=xsf_variable' 'background_curve_R=220' 'background_curve_G=background_curve_B=background_curve_ T'. x_select_palette: _variable_name,_number_of_columns={ 0:Auto | >0 } RGB RGBA . . 'variable_name' ( R,G,B,[A]) . '-1' . : 'variable_name=xsp_variable' 'number_of_columns=2'. x_shadebobs: shade bobs. x_spline: (spline). x_starfield3d: . x_tetris: . x_threshold: . x_tictactoe: (tic-tac-toe). x_tixy: "expression" x https://tixy.land. x_warp: _nb_keypoints_xgrid>=2,_nb_keypoints_ygrid>=2,_nb_keypoints_contours>=0,_preview_fidelity={ 0:Coarsest | 1:Coarse | 2:Normal | 3:Fine | 4:Finest }, _[background_image],0<=_background_opacity<=1 (image warper). : 'nb_keypoints_xgrid=nb_keypoints_ygrid=2' 'nb_keypoints_contours=0' 'preview_fidelity=1'. x_waves: . x_whirl: _opacity>=0 . : 'opacity=0.2'. 12. (Examples of Use) ----------------------------------- 'gmic' . : ### : $ gmic file1.bmp file2.jpeg ### : $ gmic input.bmp output output.jpg ### : $ gmic input.mpg append z output output.hdr ### : $ gmic input.bmp gradient_norm ### : $ gmic image.jpg denoise 30,10 output denoised.jpg ### overlay: $ gmic image1.jpg image2.jpg blend overlay output blended.jpg ### : $ gmic echo "cos(pi/4)^2+sin(pi/4)^2={cos(pi/4)^2+sin(pi/4)^2}"### : $ gmic 1000,1,1,2 fill "X=3*(x-500)/500;X^2*sin(3*X^2)+(!c?u(0,-1):cos(X*10))" plot ../img/example_plot.png [: ' '] ### : $ gmic 128,128,1,3,"u(0,255)" plasma 10,3 blur 4 sharpen 10000 n 0,255 elevation3d[-1] "'X=(x-64)/6;Y=(y-64)/6;100*exp(-(X^2+Y^2)/30)*abs(cos(X)*si n(Y))'" ../img/example_elevation3d.png [: ' '] ### : $ gmic mode3d 5 moded3d 5 isosurface3d "'x^2+y^2+abs(z)^abs(4*cos(x*y*z*3))'",3 ../img/example_isosurface3d.png [: ' '] ### G'MIC: $ gmic 0 text G'MIC,0,0,53,1,1,1,1 expand xy,10 blur 1 normalize 0,100 +plasma 0.4 add blur 1 elevation3d -0.1 moded3d 4 ../img/example_logo.png [: ' G'MIC'] ### : $ gmic repeat 20 torus3d 15,2 color3d[-1] "{u(60,255)},{u(60,255)},{u(60,255)}" *3d[-1] 0.5,1 if "{$>%2}" rotate3d[-1] 0,1,0,90 fi add3d[-1] 70 add3d rotate3d 0,0,1,18 done moded3d 3 mode3d 5 ../img/example_torii.png [: ' '] ### : $ gmic moded3d 4 isosurface3d "'x^2+2*abs(y/2)*sin(2*y)^2+z^2-3',0" sphere3d 1.5 sub3d[-1] 0,5 plane3d 15,15 rotate3d[-1] 1,0,0,90 center3d[-1] add3d[-1] 0,3.2 color3d[-1] 180,150,255 color3d[-2] 128,255,0 color3d[-3] 255,128,0 add3d ../img/example_vase.png [: ' '] ### : $ gmic demos ** G'MIC : https://gmic.eu ** G'MIC(1)