(c) Khashin S.I. http://math.ivanovo.ac.ru/dalgebra/Khashin/index.html
khash2 (at) gmail.com
From picture to text and back
Color conversions
Gluing two files
PSNR, MSE
Smoothing and Morphology
Shifts and rotations
Resize
Various methods of the image doubling
Sprites
Create/fill picture with given colors, stripes and squares
The Fourier Coefficients
Gradients, derivatives, and variation
Show points from two columns of a real matrix in a bmp-file
Conversion to b/w
Cellular automaton
Palitra
grUtil.exe block src_picture x0 y0 dx dy dst_pictureFrom picture to 3 text file-matrices:
grUtil.exe toTxt3 src_picture dst_red.txt dst_green.txt dst_blue.txtFrom the picture block to three text file-matrix:
grUtil.exe toTxt3b src_picture dst_red.txt dst_green.txt dst_blue.txt x0 y0 dx dyFrom 3 text file-matrices to bmp:
grUtil.exe Txt3bmp red.txt green.txt blue.txt picture.bmpThe RGB-color of the pixel -> stdio:
grUtil.exe PColor src_picture x yThe R-color of the pixel -> stdio:
grUtil.exe PColorR src_picture x yThe G-color of the pixel -> stdio:
grUtil.exe PColorG src_picture x yThe B-color of the pixel -> stdio:
grUtil.exe PColorB src_picture x yThe YUV-color of the pixel -> stdio:
grUtil.exe PColorYUV src_picture x yThe Y-color of the pixel -> stdio:
grUtil.exe PColorY src_picture x yMin/max RGB-color values -> stdio:
grUtil.exe min src_picture grUtil.exe max src_pictureMin/max RGB-color values on the box -> stdio:
grUtil.exe min x0 y0 dx dy src_picture grUtil.exe max x0 y0 dx dy src_pictureHistogram for 3 colors:
grUtil.exe histogram src_picture hist.txt
grUtil.exe ToGray src_picture gray_picture3 colors in separate bmp:
grUtil.exe 3Colors src_picture picture_R picture_G picture_B3 colors in separate gray bmp:
grUtil.exe 3ColorsG src_picture picture_R picture_G picture_BFrom 3 colored (or 3 gray) picture make bmp-24:
grUtil.exe fromGray picture_R picture_G picture_B dst_pictureColor normalization to inverval 0-255 by each color:
grUtil.exe normalize src_picture dst_picture
grUtil.exe JoinH src_1 src_2 dst_pictureGluing two files into one vertically:
grUtil.exe JoinV src_1 src_2 dst_pictureDifference: dst := src_1 - src_2 + 128:
grUtil.exe diff src_1 src_2 dst_picture
grUtil.exe PSNR src_1 src_2MSE(src_1,src_2) -> stdout:
grUtil.exe MSE src_1 src_2
grUtil.exe smooth src_picture r dst_pictureTriangle smoothing with radius r:
grUtil.exe smoothT src_picture r dst_pictureMorphological dilation with radius r:
grUtil.exe morphUp src_picture r dst_pictureMorphological erosion with radius r:
grUtil.exe morphDn src_picture r dst_pictureMorphological dilataion-erosion with radius r:
grUtil.exe morphUpDn src_picture r dst_pictureMorphological erosion-dilataion with radius r:
grUtil.exe morphDnUp src_picture r dst_picture
grUtil.exe shift src_picture vx vy dst_picture
grUtil.exe shift1 src_picture vx vy dst_picture
grUtil.exe rot src_picture alpha vx vy dst_picture
grUtil.exe rot1 src_picture alpha vx vy dst_picture
grUtil.exe resize src_picture mx my dst_picture
grUtil.exe resize1 src_picture mx my dst_picture
grUtil.exe border src_picture h dst_picture
grUtil.exe multiple src_picture k dst_picture
grUtil.exe downsize src_picture k dst_picture
grUtil.exe downsize2 src_picture k dst_picture
Sign "+" at the end of the command means additional optimization (see ....).
Trivial doubling (pixel to 2*2 square):
grUtil.exe double0 src_picture dst_picture
grUtil.exe double1 src_picture dst_picture grUtil.exe double1+ src_picture dst_picture grUtil.exe double3 src_picture dst_picture grUtil.exe double3+ src_picture dst_picture grUtil.exe double5 src_picture dst_picture grUtil.exe double5+ src_picture dst_picture
grUtil.exe doubleL1 src_picture dst_picture grUtil.exe doubleL1+ src_picture dst_picture grUtil.exe doubleL2 src_picture dst_picture grUtil.exe doubleL2+ src_picture dst_picture grUtil.exe doubleL3 src_picture dst_picture grUtil.exe doubleL3+ src_picture dst_picture
grUtil.exe doubleO1 src_picture dst_picture grUtil.exe doubleO1+ src_picture dst_picture grUtil.exe doubleO3 src_picture dst_picture grUtil.exe doubleO3+ src_picture dst_picture grUtil.exe doubleO5 src_picture dst_picture grUtil.exe doubleO5+ src_picture dst_picture
grUtil.exe double17 src_picture dst_picture grUtil.exe double17+ src_picture dst_picture
grUtil.exe 2double1 src_picture dst_picture grUtil.exe 2double3 src_picture dst_picture
grUtil.exe spr_ell src_picture cx cy ax ay dst_spriteCreate sprite with maximal ellips:
grUtil.exe spr_ellM src_picture dst_spritebox-sprite:
grUtil.exe spr_block src_picture x0 y0 dx dy dst_spriteApply sprite to the image, center of the sprite goes to (cx,cy):
grUtil.exe spr_put src_picture sprite cx cy dst_pictureApply sprite to the image with multiplying the size in k (double) times, center of the sprite goes to (cx,cy) with rotation by alpha degrees:
grUtil.exe spr_putR src_picture sprite k cx cy al dst_picture
grUtil.exe make mx my R G B dst_pictureFill picture of linear colors:
grUtil.exe makeL src_picture r0 rx ry g0 gx gy b0 bx byFill the interior/exterior of the ellipse with the given centre and axes of RGB color
grUtil.exe fill_el src_picture cx cy ax ay R G B dst_picture grUtil.exe fill_elO src_picture cx cy ax ay R G B dst_pictureFill the inside / outside of the rectangle with RGB color:
grUtil.exe fill_block src_picture x0 y0 dx dy R G B dst_picture grUtil.exe fill_blockO src_picture x0 y0 dx dy R G B dst_pictureCreate a picture of Ny horizontal stripes h height width mx colors R1 G1 B1 R2 G2 B2:
grUtil.exe stripH R1 G1 B1 R2 G2 B2 h Ny mx dst_pictureCreate a picture of Nx vertical stripes width h height my colors R1 G1 B1 R2 G2 B2:
grUtil.exe stripV R1 G1 B1 R2 G2 B2 h Nx my dst_pictureCreate a chess picture with colors R1 G1 B1 R2 G2 B2 from Nx*Ny squares of size h
grUtil.exe chess R1 G1 B1 R2 G2 B2 h Nx Ny dst_picture
grUtil.exe fourier1 src_picture x0 y0 dx dy i jAll coefficients of the discrete cosine Fourier transform for the region into text matrices fR.txt, fG.txt, fB.txt:
grUtil.exe fourier src_picture x0 y0 dx dy fR.txt, fG.txt, fB.txt
grUtil.exe grad src_picture dst_gray_picturedst_picture(x,y) := length of gradient of src_picture(x,y) in each RGB-color
grUtil.exe gradRGB src_picture dst_picturedst_picture(x,y) := 128 + 2*dx(src)(x,y) in each RGB-color
grUtil.exe dxRGB src_picture dst_pictureGray picture dst_gray_picture(x,y) := variation of src_picture(x,y)
grUtil.exe variat src_picture dst_gray_picturedst_picture(x,y) := variaton src_picture(x,y) in each RGB-color:
grUtil.exe variatRGB src_picture dst_gray_pictureGray picture dst_gray_picture(x,y) := morphological gradient of src_picture(x,y):
grUtil.exe gradM src_picture dst_gray_picturedst_picture(x,y) := abs(Hessian of src_picture(x,y)) in each RGB-color:
grUtil.exe hessRGB src_picture dst_pictureGray dst_picture(x,y) := abs(Hessian of src_picture(x,y))
grUtil.exe hess src_picture dst_picture
grUtil.exe show2C matr.txt x1 x2 mx my R G B rad dst_pictureShow points from two lines (y1,y2) of a real matr.txt in a bmp-file dst_picture of size mx*my by circles of color RGB and radius rad>=0.
grUtil.exe show2L matr.txt y1 y2 mx my R G B rad dst_picture
grUtil.exe bw src_picture level dst_pictureConversion to b/w using the percentage of white dots perc
grUtil.exe bwP src_picture perc dst_pictureConvert it to gray: the excess of brightness above the average in the area:
grUtil.exe leveling src_picture level dst_pictureConversion to b/w through the level of excess brightness over the average in the neighborhood:
grUtil.exe bwS src_picture level dst_pictureConversion to b/w using the percentage of white dots perc the excess brightness above the average in the area:
grUtil.exe bwSP src_picture perc dst_picture
grUtil.exe cell src_picture k dst_picture
grUtil.exe palette src_picture k dst_picture