Contents

Code Generation

Generate C/C++ code and MEX functions for toolbox functions, classes, System objects, and blocks

Start Here

Several Computer Vision System Toolbox™ functions have been enabled to generate C/C++ code. To generate code from MATLAB® code that contains Computer Vision System Toolbox functions, classes, or System objects, you must have the MATLAB Coder™ software. In general, the code you generate from Computer Vision System Toolbox blocks is portable ANSI® C code. After you generate the code, you can deploy it on another machine.

For usage notes and limitations using the supported functions, classes, and System objects listed below, refer to the Code Generation Support, Usage Notes, and Limitations table.

Functions

assignDetectionsToTracks Assign detections to tracks for multiobject tracking
detectBRISKFeatures Detect BRISK features and return BRISKPoints object
detectFastFeatures Detect corners using FAST algorithm and return cornerPoints object
detectHarrisFeatures Detect corners using Harris–Stephens algorithm and return cornerPoints object
detectMinEigenFeatures Detect corners using minimum eigenvalue algorithm and return cornerPoints object
detectMSERFeatures Detect MSER features and return MSERRegions object
detectSURFFeatures Detect SURF features and return SURFPoints object
disparity Disparity map between stereo images
epipolarLine Compute epipolar lines for stereo images
estimateFundamentalMatrix Estimate fundamental matrix from corresponding points in stereo images
estimateGeometricTransform Estimate geometric transform from matching point pairs
estimateUncalibratedRectification Uncalibrated stereo rectification
extractFeatures Extract interest point descriptors
extractHOGFeatures Extract histogram of oriented gradients (HOG) features
insertMarker Insert markers in image or video
insertShape Insert shapes in image or video
integralImage Compute integral image
isEpipoleInImage Determine whether image contains epipole
lineToBorderPoints Intersection points of lines in image and image border
matchFeatures Find matching features
ocr Recognize text using optical character recognition

Classes

binaryFeatures Object for storing binary feature vectors
BRISKPoints Object for storing BRISK interest points
cornerPoints Object for storing corner points
MSERRegions Object for storing MSER regions
ocrText Object for storing OCR results
SURFPoints Object for storing SURF interest points
vision.KalmanFilter Kalman filter for object tracking

System Objects

vision.AlphaBlender Combine images, overlay images, or highlight selected pixels
vision.Autocorrelator Compute 2-D autocorrelation of input matrix
vision.Autothresholder Convert intensity image to binary image
vision.BlobAnalysis Properties of connected regions
vision.BlockMatcher Estimate motion between images or video frames
vision.BoundaryTracer Trace object boundary
vision.CascadeObjectDetector Detect objects using the Viola-Jones algorithm
vision.ChromaResampler Downsample or upsample chrominance components of images
vision.ColorSpaceConverter Convert color information between color spaces
vision.ConnectedComponentLabeler Label and count the connected regions in a binary image
vision.ContrastAdjuster Adjust image contrast by linear scaling
vision.Convolver Compute 2-D discrete convolution of two input matrices
vision.Crosscorrelator 2-D cross-correlation of two input matrices
vision.DCT Compute 2-D discrete cosine transform
vision.Deinterlacer Remove motion artifacts by deinterlacing input video signal
vision.DemosaicInterpolator Bayer-pattern image conversion to true color
vision.DeployableVideoPlayer Display video
vision.EdgeDetector Find object edge
vision.FFT Two-dimensional discrete Fourier transform
vision.ForegroundDetector Foreground detection using Gaussian mixture models
vision.GammaCorrector Apply or remove gamma correction from images or video streams
vision.GeometricRotator Rotate image by specified angle
vision.GeometricScaler Enlarge or shrink image size
vision.GeometricShearer Shift rows or columns of image by linearly varying offset
vision.GeometricTransformer Apply projective or affine transformation to image
vision.GeometricTransformEstimator Estimate geometric transformation from matching point pairs
vision.GeometricTranslator Translate image in two-dimensional plane using displacement vector
vision.Histogram Generate histogram of each input matrix
vision.HistogramBasedTracker Histogram-based object tracking
vision.HistogramEqualizer Enhance contrast of images using histogram equalization
vision.HoughLines Find Cartesian coordinates of lines that are described by rho and theta pairs
vision.HoughTransform Find lines in images via Hough transform
vision.IDCT Compute 2-D inverse discrete cosine transform
vision.IFFT Two–dimensional inverse discrete Fourier transform
vision.ImageComplementer Complement of pixel values in binary or intensity image
vision.ImageFilter Perform 2-D FIR filtering of input matrix
vision.ImageDataTypeConverter Convert and scale input image to specified output data type
vision.ImagePadder Pad or crop input image along its rows, columns, or both
vision.LocalMaximaFinder Find local maxima in matrices
vision.MarkerInserter Draw markers on output image
vision.Maximum Find maximum values in input or sequence of inputs
vision.Mean Find mean value of input or sequence of inputs
vision.Median Find median values in an input
vision.Minimum Find minimum values in input or sequence of inputs
vision.MedianFilter 2D median filtering
vision.MorphologicalBottomHat Bottom-hat filtering on image
vision.MorphologicalClose Perform morphological closing on image
vision.MorphologicalDilate Perform morphological dilation on an image
vision.MorphologicalErode Perform morphological erosion on an image
vision.MorphologicalOpen Perform morphological opening on an image
vision.MorphologicalTopHat Top-hat filtering on image
vision.OpticalFlow Estimate object velocities
vision.PeopleDetector Detect upright people using HOG features
vision.PointTracker Track points in video using Kanade-Lucas-Tomasi (KLT) algorithm
vision.PSNR Compute peak signal-to-noise ratio (PSNR) between images
vision.Pyramid Perform Gaussian pyramid decomposition
vision.ShapeInserter Draw rectangles, lines, polygons, or circles on an image
vision.StandardDeviation Find standard deviation of input or sequence of inputs
vision.TemplateMatcher Locate template in image
vision.TextInserter Draw text on image or video stream
vision.Variance Find variance values in an input or sequence of inputs
vision.VideoFileReader Read video frames and audio samples from video file
vision.VideoFileWriter Write video frames and audio samples to video file

Blocks

2-D Autocorrelation Compute 2-D autocorrelation of input matrix
2-D Convolution Compute 2-D discrete convolution of two input matrices
2-D Correlation Compute 2-D cross-correlation of two input matrices
2-D DCT Compute 2-D discrete cosine transform (DCT)
2-D FFT Compute two-dimensional fast Fourier transform of input
2-D FIR Filter Perform 2-D FIR filtering on input matrix
2-D Histogram Generate histogram of input or sequence of inputs
2-D IDCT Compute 2-D inverse discrete cosine transform (IDCT)
2-D IFFT 2-D Inverse fast Fourier transform of input
2-D Maximum Find maximum values in input or sequence of inputs
2-D Mean Find mean value of each input matrix
2-D Median Find 2-D Median value of each input matrix
2-D Minimum Find minimum values in input or sequence of inputs
2-D Standard Deviation Find standard deviation of each input matrix
2-D Variance Compute variance of input or sequence of inputs
Apply Geometric Transformation Apply projective or affine transformation to an image
Autothreshold Convert intensity image to binary image
Blob Analysis Compute statistics for labeled regions
Block Matching Estimate motion between images or video frames
Block Processing Repeat user-specified operation on submatrices of input matrix
Bottom-hat Perform bottom-hat filtering on intensity or binary images
Chroma Resampling Downsample or upsample chrominance components of images
Closing Perform morphological closing on binary or intensity images
Color Space Conversion Convert color information between color spaces
Compositing Combine pixel values of two images, overlay one image over another, or highlight selected pixels
Contrast Adjustment Adjust image contrast by linearly scaling pixel values
Corner Detection Calculate corner metric matrix and find corners in images
Deinterlacing Remove motion artifacts by deinterlacing input video signal
Demosaic Demosaic Bayer's format images
Dilation Find local maxima in binary or intensity image
Draw Markers Draw markers by embedding predefined shapes on output image
Draw Shapes Draw rectangles, lines, polygons, or circles on images
Edge Detection Find edges of objects in images using Sobel, Prewitt, Roberts, or Canny method
Erosion Find local minima in binary or intensity images
Estimate Geometric Transformation Estimate geometric transformation from matching point pairs
Find Local Maxima Find local maxima in matrices
Frame Rate Display Calculate average update rate of input signal
From Multimedia File Read video frames and audio samples from compressed multimedia file
Gamma Correction Apply or remove gamma correction from images or video streams
Gaussian Pyramid Perform Gaussian pyramid decomposition
From Multimedia File Read video frames and audio samples from compressed multimedia file
Histogram Equalization Enhance contrast of images using histogram equalization
Hough Lines Find Cartesian coordinates of lines described by rho and theta pairs
Hough Transform Find lines in images
Image Complement Compute complement of pixel values in binary or intensity images
Image Data Type Conversion Convert and scale input image to specified output data type
Image From File Import image from image file
Image From Workspace Import image from MATLAB workspace
Image Pad Pad signal along its rows, columns, or both
Insert Text Draw text on image or video stream.
Label Label connected components in binary images
Median Filter Perform 2-D median filtering
Opening Perform morphological opening on binary or intensity images
Optical Flow Estimate object velocities
PSNR Compute peak signal-to-noise ratio (PSNR) between images
Read Binary File Read binary video data from files
Resize Enlarge or shrink image sizes
Rotate Rotate image by specified angle
Shear Shift rows or columns of image by linearly varying offset
Template Matching Locate a template in an image
To Multimedia File Write video frames and audio samples to multimedia file
To Video Display Display video data
Top-hat Perform top-hat filtering on intensity or binary images
Trace Boundary Trace object boundaries in binary images
Translate Translate image in 2-D plane using displacement vector
Video From Workspace Import video signal from MATLAB workspace
Video To Workspace Export video signal to MATLAB workspace
Video Viewer Display binary, intensity, or RGB images or video streams
Write Binary File Write binary video data to files
Was this topic helpful?