The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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$>...
> 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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.