Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Javier
Posts:
61
Registered:
4/26/11


Re: Get the surrounding pixels of a binary image
Posted:
Nov 5, 2012 10:15 AM


"Ankur Verma" wrote in message <k78kl2$9ff$1@newscl01ah.mathworks.com>... > well.. I am not sure but try this one. Try to find edge in the given image, the resulting image will give a binary image with 1 at the edge (the green colored pixel) and 0 for everything else. then simple you can find the pixel value. for example: > > %% image.png is the given image% > a=im2bw(imread('image.png')); % Return a binary image > b=find(edge(a)==1); % Return 'b' having the absolute index of the boundary pixels in the given image%% > > Regards > Ankur Verma
Hi, thanks for answering. I have solved the problem: the pixels I want are the ones whose bwdist is 1!



