you can implement this code ...
a=rgb2gray(imread('image.tif')); [x,y,z]=size(a); count=0; for i=1:x for j=1:y if a(i,j)==0 count=count+1; new_x(count)=j; new_y(count)=i; end end end
You can get coordinate values ββfrom new_x
and new_y
source share