Get data within circular ROI
Mostrar comentarios más antiguos
Hi,
I have a 2D mesh of datapoints (200x200 coordinates) that I've called plot_data. I have drawn a circular ROI on the mesh and want to extract all the coordinates within this circle.
The circle has been drawn as the following, where x and y are the coordinates that I've extracted for the line that is the circle:-
theta = linspace(0,360);
radius = 20 %circle radius
centre = [100,100] %circle centre
y = radius*sind(theta)+centre(2);
x = radius*cosd(theta)+centre(1);
c = plot(x,y,'k'); %draw circle
How would I get all the datapoints within this circle please?
Thanks!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre ROI-Based Processing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!