Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Image Region -> perimeter sample

Subject: Image Region -> perimeter sample

From: Ahmad

Date: 10 May, 2008 20:42:02

Message: 1 of 4

Hi there,

Given a binary image of a single connected object, what is
the quickest way to find a sample of pixels on its
edge/perimeter. By a sample of pixels I do not mean all
pixels on the perimeter, but just a sample of fixed number
of pixels, where each pixel is separated from the other by
some margin. (I also have the Image processing toolbox)


Regards,

Subject: Re: Image Region -> perimeter sample

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 10 May, 2008 22:41:35

Message: 2 of 4

In article <g051aq$m6a$1@fred.mathworks.com>,
Ahmad <ahmad.humyn@gmail.com> wrote:

>Given a binary image of a single connected object, what is
>the quickest way to find a sample of pixels on its
>edge/perimeter. By a sample of pixels I do not mean all
>pixels on the perimeter, but just a sample of fixed number
>of pixels, where each pixel is separated from the other by
>some margin. (I also have the Image processing toolbox)

Could you expand on the bit about "where each pixel is separated
from the other by some margin" ? Margin in what sense?
If you are talking about geometric distances, then do you want
the -furthest- point that is at most that distance away, or
do you waht the -closest- point that is at least that distance away?
If you are talking about listing the perimeter points in a list
and taking every N'th entry from the list, then you need to
determine your traversal algorithm; for example if you are
coming down from the left-top of an "X" and you reach the centre,
then which of the three other branches is the next one to follow?

--
  "Do diddle di do,
   Poor Jim Jay
   Got stuck fast
   In Yesterday." -- Walter De La Mare

Subject: Re: Image Region -> perimeter sample

From: ImageAnalyst

Date: 11 May, 2008 16:45:35

Message: 3 of 4

On May 10, 4:42=A0pm, "Ahmad " <ahmad.hu...@gmail.com> wrote:
> Hi there,
>
> Given a binary image of a single connected object, what is
> the quickest way to find a sample of pixels on its
> edge/perimeter. By a sample of pixels I do not mean all
> pixels on the perimeter, but just a sample of fixed number
> of pixels, where each pixel is separated from the other by
> some margin. (I also have the Image processing toolbox)
>
> Regards,
----------------------------------------------------------------------------=
--------
Ahmad:
What is it about bwboundary that you don't know how to deal with?
This gives you the boundaries of objects. You could then take a
"sample of fixed number of pixels" from that just by taking the first
N pixels, or using rand to generate indexes to extract or lots of
other methods. What are you really after when you say your want just
a sample of the boundaries rather than all of them. What good would
that be?
Regards,
ImageAnalyst

Subject: Re: Image Region -> perimeter sample

From: Ahmad

Date: 12 May, 2008 13:42:03

Message: 4 of 4

Thanks :) Nothing is wrong with bwboundary or
bwtraceboundary...I just didn't know about them. Thanks for
pointing me in the right direction. These functions were
exactly what I was looking for :)

Thank you for all the help.

Regards,

ImageAnalyst <imageanalyst@mailinator.com> wrote in message
<f41d7a04-fb33-46b9-978d-746a147f91f6@b64g2000hsa.googlegroups.com>...
> On May 10, 4:42=A0pm, "Ahmad " <ahmad.hu...@gmail.com> wrote:
> > Hi there,
> >
> > Given a binary image of a single connected object, what is
> > the quickest way to find a sample of pixels on its
> > edge/perimeter. By a sample of pixels I do not mean all
> > pixels on the perimeter, but just a sample of fixed number
> > of pixels, where each pixel is separated from the other by
> > some margin. (I also have the Image processing toolbox)
> >
> > Regards,
>
----------------------------------------------------------------------------=
> --------
> Ahmad:
> What is it about bwboundary that you don't know how to
deal with?
> This gives you the boundaries of objects. You could then
take a
> "sample of fixed number of pixels" from that just by
taking the first
> N pixels, or using rand to generate indexes to extract or
lots of
> other methods. What are you really after when you say
your want just
> a sample of the boundaries rather than all of them. What
good would
> that be?
> Regards,
> ImageAnalyst

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
image region Ahmad 10 May, 2008 16:45:07
perimeter Ahmad 10 May, 2008 16:45:07
sampling Ahmad 10 May, 2008 16:45:07
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics