I want to extract the middle object from the entire image It will be very helpful if someone can guide, as I am new to matlab.The image has a resolution of 200meters.I have written the code as:
A= ('A.tif');
props=(A, 'centroid');
props=regionprops(labeledImage,'Centroid');
allCentroids=props.Centroid;
xCentroids=allCentroids(1:2:end);
yCentroids=allCentroids(2:2:end);
allCentorids=allCentroids';
[size1,size2]=size(allCentroids);
imshow(A);
Best Answer