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.
% October 14, 2014
% Author: Nicolae Cindea
This code sets elements WITHIN the ellipse to value 'color'. Where can I modify it such that as long as the element touches (and need not be fully enclosed) by the ellipse to also set value to 'color'?
very useful for me ，Thank you very much
Works well, Thank you for posting this.
Very good ellipse function.
This is a great function for creating ellipses in an image matrix. Since circles are simplified ellipses it can be used to make those too. V1.1 puts a single pixel nerd on the NSEW ends for the circle (semimajor = semiminor) and for some ellipses.
fixing some typos in the description
An example of utilisation is added.
A simpler code and some new options.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.