Code Generation

Generate C code and MEX functions for toolbox functions

A number of Image Processing Toolbox™ functions support code generation. Use the toolbox with MATLAB® Coder™ to generate ANSI-compliant C code or MEX functions.


bwdist Distance transform of binary image
bweuler Euler number of binary image
bwlookup Nonlinear filtering using lookup tables
bwmorph Morphological operations on binary images
bwpack Pack binary image
bwperim Find perimeter of objects in binary image
bwselect Select objects in binary image
bwtraceboundary Trace object in binary image
bwunpack Unpack binary image
conndef Create connectivity array
edge Find edges in intensity image
fitgeotrans Fit geometric transformation to control point pairs
fspecial Create predefined 2-D filter
getrangefromclass Default display range of image based on its class
histeq Enhance contrast using histogram equalization
im2double Convert image to double precision
im2int16 Convert image to 16-bit signed integers
im2single Convert image to single precision
im2uint16 Convert image to 16-bit unsigned integers
im2uint8 Convert image to 8-bit unsigned integers
imadjust Adjust image intensity values or colormap
imbothat Bottom-hat filtering
imclearborder Suppress light structures connected to image border
imclose Morphologically close image
imcomplement Complement image
imdilate Dilate image
imerode Erode image
imextendedmax Extended-maxima transform
imextendedmin Extended-minima transform
imfill Fill image regions and holes
imfilter N-D filtering of multidimensional images
imhist Histogram of image data
imhmax H-maxima transform
imhmin H-minima transform
imlincomb Linear combination of images
imopen Morphologically open image
imquantize Quantize image using specified quantization levels and output values
imreconstruct Morphological reconstruction
imregionalmax Regional maxima
imregionalmin Regional minima
imtophat Top-hat filtering
imwarp Apply geometric transformation to image
iptcheckmap Check validity of colormap
iptcheckconn Check validity of connectivity argument
label2rgb Convert label matrix into RGB image
mean2 Average or mean of matrix elements
medfilt2 2-D median filtering
multithresh Multilevel image thresholds using Otsu's method
ordfilt2 2-D order-statistic filtering
padarray Pad array
regionprops Measure properties of image regions
rgb2gray Convert RGB image or colormap to grayscale
rgb2ycbcr Convert RGB color values to YCbCr color space
strel Create morphological structuring element (STREL)
stretchlim Find limits to contrast stretch image
watershed Watershed transform
ycbcr2rgb Convert YCbCr color values to RGB color space


imref2d Reference 2-D image to world coordinates
imref3d Reference 3-D image to world coordinates
affine2d 2-D Affine Geometric Transformation
projective2d 2-D Projective Geometric Transformation
Was this topic helpful?