Re: Binary Image Contour



Thnks a ton.

Dave Eberly wrote:
"Soumyadip Rak***" <soumyadiprak***@xxxxxxx> wrote in message
news:J4x96y.Hxv@xxxxxxxxxxxxx
I have a binary image with one blob of white on black background. I have a
point on the edge of the blob. I want to contour it and get all the ege
points.

Could you please tell me a fast contouring algorithm or C/C++ code for
doing that.

I have source code for extracting boundaries of blobs, each
boundary consisting of an ordered set of points. The concept
is not difficult. You just keep track of the direction that got
you to the current pixel, and then analyze the pixel neighborhood
to determine the next direction to walk in.

At my web site, select the Source Code tab and then the
Image Analysis tab. The file Wm3Binary2D.cpp has a function,
GetBoundaries(). The comments before this function describe
the algorithm. At my Applications page, the Image Analysis
Samples portion, the application BinaryOperations illustrates
this function (as well as a few others).

--
Dave Eberly
http://www.geometrictools.com

.