ellipseMatrix(y0, x0, a, b, theta, im, c1, c2, pInterp)

Drawing an ellipse into a matrix image.
4.8K Downloads
Updated 14 Oct 2014

View License

Set the elements of the matrix im which are in the interior of the
ellipse E to the value 'c1'. The ellipse E has center (y0, x0), the
major axis = a, the minor axis = b, and theta is the angle made by the
major axis with the orizontal axis.
ret = ellipseMatrix(y0, x0, a, b, theta, im, color)
ret is a matrix of the same size as the matrix im.
The input parameters c2 and pInterp are optional. If they are present
the ellipse will have a smoother border (of size pInterp pixels) with
variations of color between c1 and c2.
Function: ellipseMatrix
Version: 1.2
% October 14, 2014
% Author: Nicolae Cindea

Cite As

Nicolae Cindea (2024). ellipseMatrix(y0, x0, a, b, theta, im, c1, c2, pInterp) (https://www.mathworks.com/matlabcentral/fileexchange/17499-ellipsematrix-y0-x0-a-b-theta-im-c1-c2-pinterp), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Geometric Transformation and Image Registration in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3.0.0

fixing some typos in the description

1.2.0.0

An example of utilisation is added.

1.1.0.0

A simpler code and some new options.

1.0.0.0