i wanna ask, could we see the value of a centroid of an image
for example ; s = regionprops(BW, 'centroid');
can i know the pixel value of s ?
and 2nd i wanna ask.. i always try to combine 2 function or 2 jobs in 1 m.file but i always fail
for example i want to threshold picture and then i want to do some imageprocessing after threshold could i doing that in 1 m.file or i should seperate it into few m.file ?
can anyone help ? i'm a newbie in matlab 🙂
any help is appreciate
the code for the 2nd question :
I = imread('coins.png'); level = graythresh(I); BW = im2bw(I,level); s = regionprops(BW, 'centroid'); centroids = cat(1, s.Centroid); imshow(BW) hold on plot(centroids(:,1), centroids(:,2), 'b*') hold off
Best Answer