Circular mask and its division

4 views (last 30 days)
Devraj Mandal
Devraj Mandal on 10 Jun 2013
Hi all,
I need to draw a circle as the initial level set . Then I am required to draw the semi-diameters of the circle for every center angle (pi/360) and randomly selecting 20 points on every diameter.
A circular mask is easily drawn. I have used this code:
[y x] = meshgrid(1:100,1:100);
m = ((radius).^2)-((x-xcen).^2)-((y-ycen).^2)>radius;
%To make it a signed distance function I have further used the command
initial_level_set = bwdist(m)-bwdist(1-m)+im2double(m)-.5;
I cannot able to draw the semi - circles and extract those points.
Any help will be greatly appreciated.
Thanks all!

Answers (0)

Community Treasure Hunt

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

Start Hunting!