File Exchange

image thumbnail

Image Manipulation Toolbox

version 1.36.1 (14.3 MB) by DGM
A large collection of image manipulation tools of varying utility


Updated 05 Jan 2021

View Version History

View License

This library is a loose collection of image manipulation and degradation functions I developed as part of a meandering set of 'artistic' hobbies. While I have tried to extend several of the functions toward a more general utility in image editing or analysis, understand that none of these functions began life with that intention. I post these tools only on the basic assumption that if they have been useful to me, then surely they'll be useful in part to someone else.

Requires IP Toolbox for some things (see DEPENDENCIES.txt)
Let me know if there are bugs.

GUI extensions of several core functions
Multi-model color picker GUI
GUI for parametric color-based mask generation
Image viewer with support for alpha and 4D image browsing
Image blending, compositing and masking tools
Color adjustment in various color models
Contrast or chroma enhancement via levels/curves tool (RGB or LAB)
Bidirectional colorspace conversion tools (HSL, HSI, HSY, HSYp, HuSL, HuSLp, LCHab, LCHuv, SRLAB2, YCH)
Animated GIF import/export tools
4D image array support on many functions
GIMP compatibility in several tool modes

Documentation with commentary, example code, and input/output images is available here:

colorpicker  --pick color(s) from an image
cpicktool  --interactive color picker GUI
csview  --visualize the projection of sRGB in other spaces
imcompare  --interactively compare two images
imcompose  --compose image from layers as in GIMP or Photoshop
imgenerate  --interactively generate simple images
immask  --interactively generate selections (parametric magic wand, etc)
immodify  --interactively modify an image
imshow2  --image viewer with alpha & 4D support and better view controls

fourdee  --make non-4D functions work on 4D images
imrange  --return global min and max values from any size array
ismono  --determine if image is monochrome
mimread  --import arbitrary selection of files
imstacker  --arrange mismatched images into a 4D array
imstats  --return info about an image

colorpict  --easily produce solid color filled image
extractbg  --background estimation for 4D image or video
findpixels  --create a mask of pixels relative to a color
fkgen  --generate atypical filter kernels
lingrad, radgrad  --two-point or multipoint gradients
meanlines  --create a new image from vector means or extrema
mono  --extract a single channel (R,G,B,H,S,V,Y,etc)
multimask  --make mask from a combination of color matches
perlin, perlin3  --create cloudlike noise images or volumes
randlines  --create various fields of random lines and walks
randspots  --create fields of randomly located shapes
rangemask  --make mask from a combination of color matches
xwline  --Xiaolin-Wu antialiased polyline tool

addborder  --add a colored border to an image
color2alpha  --generate alpha from a selected color
colorquant  --color quantization tool
cropborder  --easily crop a border from an image
edgemap  --normalized Scharr filter
eoframe  --extract every Nth frame from an image set
eoline  --erase every n/N lines from an image
imlnc  --contrast enhancement tool (levels, curves, histeq, chroma)
imblend  --blend or composite images (with comprehensive options)
imcast  --flexible typecasting & scaling (without IPT)
imfold  --repeatedly fan-fold an image into a 4D stack
imrecolor  --histogram-based color matching between images
imtile, imdetile  --rearrange a 4D image into a flat image (or vice-versa)
imtweak  --adjust channels of an image or color
maxchroma  --calculate sRGB gamut extent in other spaces
mergedown  --merge frames of a 4-D image
permutechannels  --permute rgb or hsv channels
pseudoblurmap  --multipass variable-kernel blur approximation
replacepixels  --replace pixels with new color or second image
roiflip, roishift  --flip/shift lines in an area specified by a mask
straightshifter  --shift image channels
tonemap  --apply a tone map to an image
zblend  --use a mask to create a section of a 4D image

blockify  --flexible spatial downsampling
continuize  --add smoothing to discontinuous image transformations
dilatemargins  --selective dilation & erosion on extrema
displace  --apply a displacement map
glasstiles  --create a simple effect like glass tiles
imcartpol  --cart2pol/pol2cart/radial inversion w/lots of features
imecho  --perform frame blending on a 4-D image
imrectrotate  --normalized & constrained rotation by pixel displacement
lineshifter  --shift lines by vector means of a specified mask
shuffle  --divide image into tiles and permute them
vectorscan  --emulate the appearance of a scan processor output

multiframe GIF read/write tools
colorspace conversions
dithers (Zhou-Fang, Bayer, & 3 others)
spectrogram & spreadsheet novelties
and several others

This archive includes all image conversion/blending tools I've submitted to date

Cite As

DGM (2021). Image Manipulation Toolbox (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Coco Newton

Piotr Lenarczyk

Thx for uploading toolbox. Good for you!

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!






MIMT/FEX_dependencies/STFT toolbox



MIMT/demo scripts