Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Get the surrounding pixels of a binary image
Replies: 2   Last Post: Nov 5, 2012 10:15 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Javier

Posts: 61
Registered: 4/26/11
Re: Get the surrounding pixels of a binary image
Posted: Nov 5, 2012 10:15 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.