MATLAB: How to get the pixel at the end of an ellipse

computer visionimage processingImage Processing Toolboxregionprops

I'd like to know how to find out what pixels lie the top and bottom of an ellipse (either end of the major axis). I'm not sure how to do this. I am using regionprops to get axis length etc.

Best Answer

The major axis end points should be
xEnd = xbar + a * cos(theta)
yEnd = ybar + a * sin(theta)