image

The Octave-forge Image package provides functions for processing images. The package also provides functions for feature extraction, image statistics, spatial and geometric transformations, morphological operations, linear filtering, and much more.

Select category:

Analysis and Statistics

corr2
Compute correlation coefficients of images.
edge
Find edges using various methods.
fftconv2
Convolve 2 dimensional signals using the FFT.
fftconvn
Convolve N dimensional signals using the FFT for computation.
mean2
Compute mean value of array.
std2
Returns the standard deviation for a 2d real type matrix.
entropy
Computes the entropy of an image.
entropyfilt
Computes the local entropy in a neighbourhood around each pixel in an image.
qtdecomp
Performs quadtree decomposition.
qtgetblk
Obtain block values from a quadtree decomposition.
qtsetblk
Set block values in a quadtree decomposition.
graycomatrix
Calculates the gray-level co-occurrence matrix P of a gray-level image IM.
hough
Compute the Hough transform to find lines in a binary image.
houghlines
Extract line segments from a Hough transform.
houghpeaks
Find peaks in a Hough transform.
houghtf
Perform the Hough transform for lines or circles.
hough_line
Calculate the straight line Hough transform of a binary image I.
hough_circle
Perform the Hough transform for circles with radius R on the black-and-white image BW.
imfindcircles
Find circles in image using the circular Hough transform.
imgradient
Compute the gradient magnitude and direction in degrees for an image.
imgradientxy
Compute the x and y gradients of an image using various methods.
imhist
Produce histogram counts of image I.
immaximas
Find local spatial maximas.
immse
Compute mean squared error.
normxcorr2
Compute normalized cross-correlation.
otsuthresh
Compute global image threshold for histogram using Otsu's method.
psnr
Compute peak signal-to-noise ratio.
rangefilt
Computes the local intensity range in a neighbourhood around each pixel in an image.
regionprops
Compute properties of image regions.
stdfilt
Computes the local standard deviation in a neighbourhood around each pixel in an image.

Arithmetics

imabsdiff
Return absolute difference of image or constant to an image.
imadd
Add image or constant to an image.
imapplymatrix
Linear combination of color channels.
imcomplement
Compute image complement or negative.
imdivide
Divide image by another image or constant.
imlincomb
Combine images linearly.
immultiply
Multiply image by another image or constant.
imsubtract
Subtract image or constant to an image.

Black and white image functions

applylut
Uses lookup tables to perform a neighbour operation on binary images.
bwarea
Estimate total area of objects on the image BW.
bwareafilt
Filter objects from image based on their sizes.
bwboundaries
Trace the boundaries of the objects in a binary image.
bwconncomp
Find connected objects.
bwdist
Compute distance transform in binary image.
bweuler
Calculate the Euler number of a binary image.
bwfill
Perform a flood-fill operation on the binary image BW1.
bwhitmiss
Perform binary hit-or-miss transform.
bwlabel
Label binary 2 dimensional image.
bwlabeln
Label foreground objects in the n-dimensional binary image BW.
bwmorph
Perform morphological operation on binary image.
bwpack
Pack binary image.
bwperim
Find perimeter of objects in binary images.
bwpropfilt
Filter objects from image based on their properties.
bwselect
Select connected regions in a binary image.
bwunpack
Unpack binary image.
fchcode
Determine the Freeman chain code for a boundary.
labelmatrix
Create labelled matrix from bwconncomp structure.
makelut
Create a lookup table which can be used by applylut.

Colour maps and Colour controls

colorangle
Compute angle between RGB colors in degrees.
colorgradient
Define a colour map which smoothly traverses the given colors.
rgb2ycbcr
Convert RGB values to YCbCr.
wavelength2rgb
Convert wavelength in nm into an RGB value set.
ycbcr2rgb
Convert YCbCr color space to RGB.

Display

axes2pix
Convert axes coordinates to pixel coordinates.
montage
Create montage from multiple images.
subimage
Display images in subplots.
viscircles
Draw circles on figure.

Enhancement and Restoration

histeq
Equalize histogram of grayscale image.
imadjust
Adjust image or colormap intensity (values).
imnoise
Add noise to image.
imsmooth
Smooth the given image using several different algorithms.
medfilt2
Two dimensional median filtering.
ordfilt2
Two dimensional ordered filtering.
ordfiltn
N dimensional ordered filtering.
stretchlim
Find limits to contrast stretch an image.

Filtering and Transforms

deconvwnr
Apply Wiener deconvolution filter.
findbounds
Estimate bounds for spatial transformation.
fspecial
Create spatial filters for image processing.
imfilter
Computes the linear filtering of the image I and the filter F.
imtransform
Transform image.
integralImage
Calculate the integral image.
integralImage3
Calculate the 3D integral image.
intlut
Convert integer values with lookup table (LUT).
iradon
Performs filtered back-projection on the projections in PROJ to reconstruct an approximation of the original image.
nonmax_suppress
Performs non-maximum suppression on the given edge data.
radon
Calculates the 2D-Radon transform of the matrix I at angles given in THETA.
rho_filter
Filters the parallel ray projections in the columns of PROJ, according to the filter type chosen by TYPE.
wiener2
Apply an adaptive noise reduction filter.

Morhophological Operations

bwareaopen
Perform area opening.
conndef
Create connectivity array.
imbothat
Perform morphological bottom hat filtering.
imclearborder
Clear borders of objects or ligher structures.
imclose
Perform morphological closing.
imdilate
Perform morphological dilation.
imerode
Perform morphological erosion.
imextendedmax
Caculate the (morphological) extended maxima of an image IM.
imextendedmin
Caculate the (morphological) extended minima of an image IM.
imfill
Fill image holes or regions.
imhmax
Caculate the morphological h-maximum transform of an image IM.
imhmin
Caculate the morphological h-minimum transform of an image IM.
imimposemin
Modify the input impage IM to only have regional minima at the marker positions given by the nonzero pixels of BW.
imopen
Perform morphological opening.
imreconstruct
See also: imclearborder, imdilate, imerode.
imregionalmax
Compute regional maxima.
imregionalmin
Compute regional minima.
imtophat
Perform morphological top hat filtering.
mmgradm
Perform morphological gradient.
@strel/getheight
Return the heights of a non-flat structuring element.
@strel/getneighbors
Get neighbors relative position and height.
@strel/getnhood
Return the neighborhood of structuring element SE.
@strel/getsequence
Decompose structuring element.
@strel/isflat
Say if a structuring element object is flat or not.
@strel/reflect
Reflect structuring element of strel object.
@strel/strel
Create a strel (structuring element) object for morphology operations.
@strel/translate
Generate a new structuring element, which is SE translated in rows and columns as expressed in the offset 2-dimensional array V.
watershed
Compute watershed transform.

Read/write

analyze75info
Read header of an Analyze 7.5 file.
analyze75read
Read image data of an Analyze 7.5 file.
analyze75write
Write image data to an Analyze 7.5 file.
tiff_tag_read
Read value of TAGs from TIFF files.

Region-based and block processing

bestblk
Calculate block best size for block processing.
blockproc
Processes image in blocks using user-supplied function.
col2im
Rearrange block columns back into matrix.
colfilt
Apply function to matrix blocks
im2col
Rearrange blocks from matrix into columns.
impixel
Get pixel values.
nlfilter
Process matrix in sliding blocks with user-supplied function.
poly2mask
Convert a polygon to a region mask.
roicolor
Select a Region Of Interest of an image based on color.

Spatial transformations

affine2d
tform is a representation of an affine 2D transform.
affine3d
tform is a representation of an affine 3D transform.
cp2tform
Return a transformation structure T (see "help maketform" for the form of the structure) that can be further used to transform coordinates between an input space and an ouput space.
imcrop
Crop image.
imperspectivewarp
Applies the spatial perspective homogeneous transformation P to the image IM.
impyramid
Compute gaussian pyramid expansion or reduction.
imremap
Applies any geometric transformation to the image IM.
imresize
Resize image with interpolation
imrotate
Rotate image about its center.
imshear
Applies a shear to the image M.
imtranslate
Translate a 2D image by (x,y) using Fourier interpolation.
maketform
Create a transform structure T to be used for spatial transformations between an input space and an output space.
rotate_scale
Arbitrary rotation and scaling of a gray-scale image using fast bilinear interpolation.
tformfwd
Given a transform structure T, transform coordinates UV in the input space into coordinates XY in the output space.
tforminv
Given a transform structure T, transform coordinates XY in the output space into coordinates UV in the input space.

Types and Type conversions

grayslice
Create indexed image from intensity image using multilevel thresholding.
graythresh
Compute global image threshold.
im2bw
Convert image to binary, black and white, by threshold.
im2double
Convert image to double precision.
im2int16
Convert image to int16.
im2single
Convert image to single precision.
im2uint16
Convert image to uint16.
im2uint8
Convert image to uint8.
imcast
Convert image to specific data type TYPE.
imquantize
Quantize image with multiple threshold levels and values.
isbw
Return true if IMG is a black and white image.
isgray
Return true if IMG is a grayscale image.
isind
Return true if IMG is an indexed image.
isrgb
Return true if IMG is a RGB image.
lab2double
Convert L*a*b* data to double precision.
lab2rgb
Transform a colormap or image from CIE L*a*b* to sRGB color space.
lab2single
Convert L*a*b* data to single precision.
lab2uint16
Convert L*a*b* data to uint16 precision.
lab2uint8
Convert L*a*b* data to uint8 precision.
lab2xyz
Transform a colormap or image from CIE L*a*b* to CIE XYZ color space.
label2rgb
Convert labeled image into RGB.
mat2gray
Convert a matrix to an intensity image.
ntsc2rgb
Transform a colormap or image from luminance-chrominance (NTSC) space to red-green-blue (RGB) color space.
rgb2gray
Transform an image or colormap from red-green-blue (RGB) color space to a grayscale intensity image.
rgb2lab
Transform a colormap or image from sRGB to CIE L*a*b* color space.
rgb2ntsc
Transform a colormap or image from red-green-blue (RGB) color space to luminance-chrominance (NTSC) space.
rgb2xyz
Transform a colormap or image from sRGB to CIE XYZ color space.
xyz2lab
Transform a colormap or image from CIE XYZ to CIE L*a*b* color space.
xyz2rgb
Transform a colormap or image from CIE XYZ to sRGB color space.

Utilities

checkerboard
Create checkerboard.
edgetaper
Blur border (edges) of image to prevent ringing artifacts.
getrangefromclass
Return display range of image.
imattributes
Get information about image attributes.
imfuse
Composite of two images.
imgetfile
Open GUI dialogue to select image files.
imshowpair
Combines two images using a specified METHOD.
iptcheckconn
Check if argument is valid connectivity.
iptcheckmap
Check if argument is valid colormap.
iptnum2ordinal
Convert number to ordinal string.
otf2psf
Compute PSF from OTF.
padarray
Pad array or matrix.
phantom
Create computational phantom head.
psf2otf
Compute OTF from PSF.

Image Registration

@imref2d/contains.m
Determine if image contains points in world coordinate system.
@imref2d/disp.m
See also: .
@imref2d/imref2d.m
Reference 2-D image to world coordinates.
@imref2d/intrinsicToWorld.m
Convert from intrinsic to world coordinates.
@imref2d/sizesMatch.m
Determine if object and image are size-compatible.
@imref2d/subsasgn.m
See also: .
@imref2d/subsref.m
See also: .
@imref2d/worldToIntrinsic.m
Convert from world to intrinsic coordinates.
@imref2d/worldToSubscript.m
Convert world coordinates to row and column subscripts.
@imref3d/contains.m
Determine if image contains points in world coordinate system.
@imref3d/disp.m
See also: .
@imref3d/imref3d.m
Reference 3-D image to world coordinates.
@imref3d/intrinsicToWorld.m
Convert from intrinsic to world coordinates.
@imref3d/subsasgn.m
See also: .
@imref3d/subsref.m
See also: .
@imref3d/worldToIntrinsic.m
Convert from world to intrinsic coordinates.
@imref3d/worldToSubscript.m
Convert world coordinates to row, column and plane subscripts.

Package: image