spatial coordinates of BW image
3 views (last 30 days)
I have a BW image in which few pixels are white rest all are black.. I want to store the spatial co-ordinates of only white pixels in to 2D matrix having only 2 columns(to represent x y coordinates) and any number of rows.. How do I do that? Pl. help me.
More Answers (1)
Jan on 6 Nov 2013
A = randn(100,100) > .5; % example binary image
[row col] = find( A == 1 );
res = [ row col ];
This should give you the locations of the pixels containing a '1' in the matrix res.