3 connectivity in binary image
Message-ID:<4c3c0789-3b81-4bfd-97a9-85e9b3628277@v39g2000yqm.googlegroups.com>
Subject:
3-connectivity in binary image
Date:Wed, 25 Feb 2009 21:45:53 +0100
Hi all, I wonder if any experts from image processing have an algorithm or source code (even better) for calculating 3-connectivity on a binary image, which is defined as such when a pixel has at least three direct neighboring pixels (ie, same row/column, but not corner pixels). Thanks very much, howard
Message-ID:<3f2dfe12-c037-435f-aa08-e048e266e815@13g2000yql.googlegroups.com>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 02:46:38 +0100
On Feb 25, 3:45=A0pm, howardc <mingchao2...@gmail.com> wrote: > Hi all, > > I wonder if any experts from image processing have an algorithm or > source code (even better) for calculating 3-connectivity on a binary > image, which is defined as such when a pixel has at least three direct > neighboring pixels (ie, same row/column, but not corner pixels). > Thanks very much, > > howard ---------------------------------------------------------------------------= -------------------- howard: Yes, it's called convolution. Just convolve (a standard window scanning technique) your binary image with a 3x3 kernel that is a cross shape (5 pixels on, and the corners off). The output image will be a gray scale image, not a binary image. Then look at your output image and threshold for intensities of 3 or 4 to find pixels that are 3 or 4 connected to their neighbors. You can find convolution source code easily, I'm sure. I never heard of 3-connectivity. What use does it have? What can it do that the standard 4- and 8-connected don't do? Regards, ImageAnalyst
Message-ID:<C9GdnZfj8ZpSvzfUnZ2dnUVZ_gQLAAAA@giganews.com>
Subject:
Re: 3-connectivity in binary image
Date:Sun, 1 Mar 2009 06:53:19 +0100
On Wed, 25 Feb 2009 17:46:38 -0800, ImageAnalyst wrote:
...
> howard:
> Yes, it's called convolution. Just convolve (a standard window scanning
> technique) your binary image with a 3x3 kernel that is a cross shape (5
> pixels on, and the corners off). The output image will be a gray scale
> image, not a binary image. Then look at your output image and threshold
> for intensities of 3 or 4 to find pixels that are 3 or 4 connected to
> their neighbors. You can find convolution source code easily, I'm sure.
>
> I never heard of 3-connectivity. What use does it have? What can it do
> that the standard 4- and 8-connected don't do? Regards,
> ImageAnalyst
I suppose it detects vertical or horizontal edges that are at least 2
pixels wide, while excluding 2x2 corners.
I have to wonder how valuable an edge detector it would be except on
images with *extremely* regular edges.
Randy
Message-ID:<877i3dq48i.fsf@mercury.parapara.net>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 04:14:21 +0100
howardc <mingchao2005@gmail.com> writes: > Hi all, > > I wonder if any experts from image processing have an algorithm or > source code (even better) for calculating 3-connectivity on a binary > image, which is defined as such when a pixel has at least three direct > neighboring pixels (ie, same row/column, but not corner pixels). > Thanks very much, Do you mean 4, 6 or 8 way connectivity. In 4 way connectivity, having 3 connected means that you are on an edge..... wes > > howard -- Wesley Hosking, wes@linvid.com http://www.linvid.com/~wes ------------------------------------------------------------------------------
Message-ID:<127e7d8d-6980-4aa8-9ae7-9f3dd3834acf@j8g2000yql.googlegroups.com>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 14:07:51 +0100
On Feb 25, 10:14=A0pm, Wesley Hosking <w...@linvid.com> wrote: > howardc <mingchao2...@gmail.com> writes: > > Hi all, > > > I wonder if any experts from image processing have an algorithm or > > source code (even better) for calculating 3-connectivity on a binary > > image, which is defined as such when a pixel has at least three direct > > neighboring pixels (ie, same row/column, but not corner pixels). > > Thanks very much, > > Do you mean 4, 6 or 8 way connectivity. > > In 4 way connectivity, having 3 connected means that you are on an edge..= ... > > wes > > > > > howard > > -- > Wesley Hosking, > w...@linvid.comhttp://www.linvid.com/~wes > -------------------------------------------------------------------------= --=AD--- Not necessarily. In a rectangular coordinate system, a pixel that has "three direct neighboring pixels (ie, same row/column, but not corner pixels)." (to use the OP's words, could mean a pixel in a skeleton that is a branch point. That is, the crossing point in a "T" branch point of a skeleton (which is not an edge).
Message-ID:<go67ir$a5a$1@fred.mathworks.com>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 15:05:15 +0100
howardc wrote:
> Hi all,
>
> I wonder if any experts from image processing have an algorithm or
> source code (even better) for calculating 3-connectivity on a binary
> image, which is defined as such when a pixel has at least three direct
> neighboring pixels (ie, same row/column, but not corner pixels).
> Thanks very much,
>
> howard
Hmm. Isn't this just looping over every input image pixel and counting
the number of foreground neighbor pixels? In pseudo-code:
For each pixel p in I:
Count number of foreground pixels in N_4(p)
if count >= 3
Set J(p) to foreground
else
Set J(p) to background
end if
End for
I is the input image.
J is the output image.
N_4(p) is the set of north, east, south, and west neighbors of pixel p.
---
Steve Eddins
http://blogs.mathworks.com/steve/
Message-ID:<4c3c0789-3b81-4bfd-97a9-85e9b3628277@v39g2000yqm.googlegroups.com>
Subject:
3-connectivity in binary image
Date:Wed, 25 Feb 2009 21:45:53 +0100
Hi all, I wonder if any experts from image processing have an algorithm or source code (even better) for calculating 3-connectivity on a binary image, which is defined as such when a pixel has at least three direct neighboring pixels (ie, same row/column, but not corner pixels). Thanks very much, howard
Message-ID:<3f2dfe12-c037-435f-aa08-e048e266e815@13g2000yql.googlegroups.com>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 02:46:38 +0100
On Feb 25, 3:45=A0pm, howardc <mingchao2...@gmail.com> wrote: > Hi all, > > I wonder if any experts from image processing have an algorithm or > source code (even better) for calculating 3-connectivity on a binary > image, which is defined as such when a pixel has at least three direct > neighboring pixels (ie, same row/column, but not corner pixels). > Thanks very much, > > howard ---------------------------------------------------------------------------= -------------------- howard: Yes, it's called convolution. Just convolve (a standard window scanning technique) your binary image with a 3x3 kernel that is a cross shape (5 pixels on, and the corners off). The output image will be a gray scale image, not a binary image. Then look at your output image and threshold for intensities of 3 or 4 to find pixels that are 3 or 4 connected to their neighbors. You can find convolution source code easily, I'm sure. I never heard of 3-connectivity. What use does it have? What can it do that the standard 4- and 8-connected don't do? Regards, ImageAnalyst
Message-ID:<C9GdnZfj8ZpSvzfUnZ2dnUVZ_gQLAAAA@giganews.com>
Subject:
Re: 3-connectivity in binary image
Date:Sun, 1 Mar 2009 06:53:19 +0100
On Wed, 25 Feb 2009 17:46:38 -0800, ImageAnalyst wrote:
...
> howard:
> Yes, it's called convolution. Just convolve (a standard window scanning
> technique) your binary image with a 3x3 kernel that is a cross shape (5
> pixels on, and the corners off). The output image will be a gray scale
> image, not a binary image. Then look at your output image and threshold
> for intensities of 3 or 4 to find pixels that are 3 or 4 connected to
> their neighbors. You can find convolution source code easily, I'm sure.
>
> I never heard of 3-connectivity. What use does it have? What can it do
> that the standard 4- and 8-connected don't do? Regards,
> ImageAnalyst
I suppose it detects vertical or horizontal edges that are at least 2
pixels wide, while excluding 2x2 corners.
I have to wonder how valuable an edge detector it would be except on
images with *extremely* regular edges.
Randy
Message-ID:<877i3dq48i.fsf@mercury.parapara.net>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 04:14:21 +0100
howardc <mingchao2005@gmail.com> writes: > Hi all, > > I wonder if any experts from image processing have an algorithm or > source code (even better) for calculating 3-connectivity on a binary > image, which is defined as such when a pixel has at least three direct > neighboring pixels (ie, same row/column, but not corner pixels). > Thanks very much, Do you mean 4, 6 or 8 way connectivity. In 4 way connectivity, having 3 connected means that you are on an edge..... wes > > howard -- Wesley Hosking, wes@linvid.com http://www.linvid.com/~wes ------------------------------------------------------------------------------
Message-ID:<127e7d8d-6980-4aa8-9ae7-9f3dd3834acf@j8g2000yql.googlegroups.com>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 14:07:51 +0100
On Feb 25, 10:14=A0pm, Wesley Hosking <w...@linvid.com> wrote: > howardc <mingchao2...@gmail.com> writes: > > Hi all, > > > I wonder if any experts from image processing have an algorithm or > > source code (even better) for calculating 3-connectivity on a binary > > image, which is defined as such when a pixel has at least three direct > > neighboring pixels (ie, same row/column, but not corner pixels). > > Thanks very much, > > Do you mean 4, 6 or 8 way connectivity. > > In 4 way connectivity, having 3 connected means that you are on an edge..= ... > > wes > > > > > howard > > -- > Wesley Hosking, > w...@linvid.comhttp://www.linvid.com/~wes > -------------------------------------------------------------------------= --=AD--- Not necessarily. In a rectangular coordinate system, a pixel that has "three direct neighboring pixels (ie, same row/column, but not corner pixels)." (to use the OP's words, could mean a pixel in a skeleton that is a branch point. That is, the crossing point in a "T" branch point of a skeleton (which is not an edge).
Message-ID:<go67ir$a5a$1@fred.mathworks.com>
Subject:
Re: 3-connectivity in binary image
Date:Thu, 26 Feb 2009 15:05:15 +0100
howardc wrote:
> Hi all,
>
> I wonder if any experts from image processing have an algorithm or
> source code (even better) for calculating 3-connectivity on a binary
> image, which is defined as such when a pixel has at least three direct
> neighboring pixels (ie, same row/column, but not corner pixels).
> Thanks very much,
>
> howard
Hmm. Isn't this just looping over every input image pixel and counting
the number of foreground neighbor pixels? In pseudo-code:
For each pixel p in I:
Count number of foreground pixels in N_4(p)
if count >= 3
Set J(p) to foreground
else
Set J(p) to background
end if
End for
I is the input image.
J is the output image.
N_4(p) is the set of north, east, south, and west neighbors of pixel p.
---
Steve Eddins
http://blogs.mathworks.com/steve/



RSS News Feed