This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Code Generation

Generate C code and MEX functions for toolbox functions

MATLAB® Coder™ generates standalone C code from Image Processing Toolbox™ functions that have been enabled to support code generation. Using the toolbox with MATLAB Coder, you can generate ANSI-compliant C code or MEX functions.


adaptthresh Adaptive image threshold using local first-order statistics
boundarymask Find region boundaries of segmentation
bwareaopen Remove small objects from binary image
bwboundaries Trace region boundaries in binary image
bwconncomp Find connected components in binary image
bwdist Distance transform of binary image
bweuler Euler number of binary image
bwlabel Label connected components in 2-D 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
demosaic Convert Bayer pattern encoded image to truecolor image
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
grayconnected Select contiguous image region with similar gray values
histeq Enhance contrast using histogram equalization
hough Hough transform
houghlines Extract line segments based on Hough transform
houghpeaks Identify peaks in Hough transform
hsv2rgb Convert HSV colormap to RGB colormap
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
imabsdiff Absolute difference of two images
imadjust Adjust image intensity values or colormap
imbinarize Binarize image by thresholding
imbothat Bottom-hat filtering
imboxfilt 2-D box filtering of images
imclearborder Suppress light structures connected to image border
imclose Morphologically close image
imcomplement Complement image
imcrop Crop 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
imfindcircles Find circles using circular Hough transform
imgaborfilt Apply Gabor filter or set of filters to 2-D image
imgaussfilt 2-D Gaussian filtering of images
imgradient3 Find 3-D gradient magnitude and direction of images
imgradientxyz Find the directional gradients of a 3-D image
imhist Histogram of image data
imhmax H-maxima transform
imhmin H-minima transform
imlincomb Linear combination of images
immse Mean-squared error
imopen Morphologically open image
imoverlay Burn binary mask into 2-D image
impyramid Image pyramid reduction and expansion
imquantize Quantize image using specified quantization levels and output values
imread Read image from graphics file
imreconstruct Morphological reconstruction
imregionalmax Regional maxima
imregionalmin Regional minima
imresize Resize image
imrotate Rotate image
imtophat Top-hat filtering
imtranslate Translate image
imwarp Apply geometric transformation to image
integralBoxFilter 2-D box filtering of integral images
integralImage Calculate integral image
intlut Convert integer values using lookup table
iptcheckmap Check validity of colormap
iptcheckconn Check validity of connectivity argument
lab2rgb Convert CIE 1976 L*a*b* to RGB
label2rgb Convert label matrix into RGB image
label2idx Convert label matrix to cell array of linear indices
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
otsuthresh Global histogram threshold using Otsu's method
padarray Pad array
psnr Peak Signal-to-Noise Ratio (PSNR)
regionprops Measure properties of image regions
rgb2gray Convert RGB image or colormap to grayscale
rgb2hsv Convert RGB colormap to HSV colormap
rgb2lab Convert RGB to CIE 1976 L*a*b*
rgb2ycbcr Convert RGB color values to YCbCr color space
stretchlim Find limits to contrast stretch image
superpixels 2-D superpixel oversegmentation of images
superpixels3 3-D superpixel oversegmentation of 3-D 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
strel Morphological structuring element
offsetstrel Morphological offset structuring element

Examples and How To

Generate Code from Application Containing Image Processing Functions

This example shows how to generate C code using MATLAB Coder from MATLAB applications that use Image Processing Toolbox functions.


Code Generation for Image Processing

Certain Image Processing Toolbox functions have been enabled to generate C code using MATLAB Coder.

Understanding Code Generation with Image Processing Toolbox

The Image Processing Toolbox includes many functions that support the generation of efficient C code using MATLAB Coder.

List of Supported Functions with Usage Notes

List of functions supported by code generation from MATLAB

Was this topic helpful?