hi, thanks in advance for viewing my question and trying to answer it. i have a retinal image as my input which is black and white.now all i need is to get total number of connected components and xy-coordinates of those pixels which are labelled. i found the labels using bwlabel() and now i need coordinates for those labels.here opim is my input image.
label=bwlabel(opim);d=max(max(label));for j=1:d [row,col]=find(label==j); len=max(row)-min(row)+2; breadth=max(col)-min(col)+2; target=uint8(zeros([len breadth])); sy=min(col)-1; sx=min(row)-1; for i=1:size(row,1) x=row(i,1)-sx; y=col(i,1)-sy; target(x,y)=opim(row(i,1),col(i,1)); end end
thankyou.
Best Answer