How to store the perimeter pixels of a semi circle in an array that is drawn over an binary image?
Show older comments
I have a binary image and I want to draw a circle over this image so that it crosses all the active fingers. After that I only want to consider half of the circle(only going over the upper part of the image this will remove lower circle part i.e.the wrist part). Next want to store all the perimeter pixels to an array. How to do that ?
Answers (1)
KSSV
on 19 Apr 2018
I = imread('P1_G5_4.png') ;
imshow(I)
hold on
[y,x] = find(I==0) ; % Centre of circle C = [mean(x) mean(y)] ; % GEt radius of circle R = max(sqrt((C(1)-x).^2+(C(2)-y).^2)) ; th = linspace(0,2*pi) ;
xc = C(1)+R*cos(th) ; yc = C(2)+R*sin(th) ;
plot(xc,yc,'r') ;
1 Comment
Zara Khan
on 21 Apr 2018
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!