File Exchange

image thumbnail

Image Manipulation Toolbox

version 1.30.1 (9.68 MB) by DGM
A collection of image manipulation tools of varying utility

25 Downloads

Updated 29 Sep 2018

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.

Highlights:
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 (HSI, HSY, HSYp, HuSL, HuSLp, LCHab, LCHuv, SRLAB2)
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:
http://myplace.frontier.com/~chooks9592/manual/index.html

GRAPHICAL INTERFACES
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

FILE HANDLING & GENERAL TOOLS
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

MASK & FIELD GENERATION
colorpict  --easily produce solid color filled image
findpixels  --create a mask of pixels relative to a color
lingrad  --two-point or multipoint linear gradient
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  --create cloudlike noise images
perlin3  --create perlin noise volumes
radgrad  --two-point or multipoint radial gradient
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

IMAGE MANIPULATION
addborder  --add a colored border to an image
cropborder  --easily crop a border from an image
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
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
replacepixels  --replace pixels with new color or second image
roiflip  --flip lines in an area specified by a mask
roishift  --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

DISTORTION & DEGRADATION
blockify  --flexible spatial downsampling
dilatemargins  --selective dilation & erosion on extrema
displace  --apply a displacement map
driftds  --changing superpixel boundaries create illusion of motion
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
jpegger  --degrade image with jpeg compression
jpegslur  --translate compression error into line displacement
lineshifter  --shift lines by vector means of a specified mask
paritysweep  --explore parity distribution in a compressed image
picdynamics  --LTI system response simulation on image rows
rectds  --randomly located rectangles of mean image color
shuffle  --divide image into tiles and permute them
vectorscan  --emulate the appearance of a scan processor output

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

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

Comments and Ratings (2)

Coco Newton

Thx for uploading toolbox. Good for you!

Updates

1.30.1

forgot to include the update to imcompose

1.30

update to imblend():
added 'softlighteb2', a parametric, symmetric, continuous softlight method

1.29.1

synopsis edit in a file

1.29

minor updates to addborder, imblend
typo fixes in imfold, imcartpol

1.28

FIXED: stretchlimFB, imcompare, imblend, text2spectrogram, im2spectrogram
IMPROVED: imblend, imcompose, imshow2, ismono
ADDED: memsize

1.27.0.0

speed improvements to imblend
imcartpol now supports capture of randomized transformations for re-use

1.26.1.0

try again

1.26.1.0

attempt to fix formatting again

1.26.1.0

attempt to fix description formatting

1.26.1.0

fixed a bug in imshow2 and gifwrite for logical images

1.26.0.0

displace: added interpolation, cleaned a few things up
imshow2: added 4D support and a stack browsing gui mode
ADDED: imcartpol, mimread, imstacker

1.25.0.0

FIXED: meanlines, addborder, zfdither
IMPROVED: shuffle, glasstiles, imcompose, randlines, mergedown, immodify
ADDED: randrange, noisedither, imfold, erraccumulate

1.24.1.0

bugfix in imtweak for 4-D inputs and HSY mode

1.24.0.0

updated gif tools

1.23.0.0

BUGFIXES: permutechannels, imcompose, imblend, imlnc, orddither, hsy2rgb
IMPROVED: permutechannels, eoline, imcompose, imblend, immodify, imlnc, gif & gradient tools
ADDED: arborddither, linedither, lcdemu, bicoloradapt, xwline, zblend, imdrag

1.22.0.0

bugfix in replacepixels
imcompare:
added NaN & OoG view modes and counts
uses linked axes instead of concatenation for 2-up view

1.21.0.0

updates and bugfixes in image conversion tools
geometry and view control updates to GUI tools (now uses akZoom)
introduction of IMMASK
csview fixed to work in subplots

1.20.0.0

removed more dependencies:
csview, vectorscan, thresholdinpaint, picdynamics

see DEPENDENCIES.txt for list of IPT and FEX dependencies

1.19.0.0

updated description

1.19.0.0

removed IPT dependency from MOST tools (see text file)
REPLACEPIXELS replaces BLENDMASK
IMLNC replaces IMADJUST3
lots of cleanup, extra class support, etc

1.18.0.0

added IPT dependency note
no room left in description

1.18.0.0

bugfix in imcompose and imgenerate
expanded functionality of imadjust3 and immodify
added more class support to imtweak, imadjust3, others

1.17.0.0

added Zhou-Fang and ordered dither tools for use with IMBLEND, etc
major updates to imblend and imcompose
minor update to jpegger, imgenerate, immodify

1.16.1.0

minor imblend update

1.16.0.0

minor imblend update

1.15.0.0

added GUI tools (imcompose, imcompare, immodify, imgenerate, cpicktool)
updated imblend, imadjust3, meanlines

1.14.0.0

updates to imblend, replacepixels, tonemap, and LCH conversion LUT's
smaller package size

1.13.0.0

removed colorspace dependency from core tools (imblend, imtweak)
expanded and improved imblend and tonemap

1.12.0.0

updated blend tools

1.11.0.0

updated imblend() with compositing options

1.10.0.0

updated 'imblend' with new modes
added contour plot reference for imblend modes

1.9.0.0

batchloader() now supports images with alpha
imblend() now supports alpha compositing
maxchroma() and RGB-LCH tools now support SRLAB2

1.8.0.0

updated docs links

1.8.0.0

code cleanup in sRGB-LCH functions for accuracy & extensibility
added d50 adaptation mode to LCH conversions out of sheer boredom
corrected CSVIEW() plot orientation in CIEXYZ mode

1.7.1.0

bugfix in maxchroma()
fixes convergence problem in 'labcalc' mode for some images
also did some minor speed optimization

1.7.0.0

fixed edge convergence inaccuracy in MAXCHROMA() for LAB in direct calculation mode
see manual page or blog for details

1.6.0.0

bugfix in csview
added alpha adjustment to csview gui tool
moved boundary chroma calculations from LCH and HuSL tools to a standalone function
added tentative direct calculation method for LAB, updated LABLUT.mat with more accurate calculations

1.5.0.0

removed obsolete dependency check from imtweak
added YPP mode to imtweak for sake of completeness with regard to YPP/HSY, LCH/HuSL symmetry
updated speed benchmarks

1.4.0.0

modified LCH conversion tools to provide optional data truncation methods
changed IMTWEAK and IMBLEND to use bounded LCH methods
cleaned up IMBLEND color modes
added native modes to HuSL and HSY conversion tools

1.3.1.0

bugfix in imtweak HSL transfer mode

1.3.0.0

added HSYp & HSL support to IMBLEND() and cleaned up some dependency checks

1.2.0.0

added HSYp option to HSY conversion methods
added HSYp support to IMTWEAK()

1.1.0.0

added HuSLp support to RGB-HuSL converters
added HuSLp and LCHab/uv support to IMTWEAK()

1.0.0.0

modified description

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