Login  Register

Re: Finding distances to edge of a "blob"

Posted by Burger Wilhelm on Mar 10, 2008; 6:43pm
URL: http://imagej.273.s1.nabble.com/Finding-distances-to-edge-of-a-blob-tp3696949p3696951.html

Tracing of region boundaries is not trivial and you probably don't need
any chain code but simply the list of boundary points (coordinates).
Yes, there IS a tracer for ImageJ in our textbook sample code that
includes binary region segmentation, contour tracing etc.

The source code can be found at
http://www.imagingbook.com/index.php?id=98 (Chap. 11).

Wilhelm
www.imagingbook.com


> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On
> Behalf Of Sami Badawi
> Sent: Monday, March 10, 2008 7:16 PM
> To: [hidden email]
> Subject: Re: Finding distances to edge of a "blob"
>
> Hi meastwood98,
>
> I can think of 2 approaches:
>
> 1: Trace angle lines (30, 60, 90) from center to first
> background point.
>
> Look at a line drawing algorithm if you have a hard time
> finding what points
> are on the lines.
>
> This is simple but only works if the blobs are convex.
>
> 2: Trace the edge of the blob
>
> Trace the edge of the blob and for each new point take the
> distance and the
> angle between your chosen center point.
> If a points that have an angle that is a multiple of 30 store
> the distance,
> if another point also have the same angle store the max distance.
>
> The main idea to this edge tracing algorithm is:
> Say you want to trace the blob in say clockwise direction:
> * Choose 2 points on the edge of the blog going in clockwise direction
> * Always choose the next edge point on the blob by starting
> on the previous
> point, and go around the current point until you get to a
> point at the edge
> * Stop when you get back to the first point
>
> The lines from one edge point to the next are usually stored
> in what is
> called chain code, number going from 0 to 7 for each direction.
>
> I did a Google search for: "chain code" blob and found a few
> references
>
> https://www.cs.tcd.ie/courses/computervision/ConnectedComponents.html
>
> http://books.google.com/books?id=IZveETjcNLMC&pg=PA114&lpg=PA1
14&dq=%22chain+code%22+blob&source=web&ots=tI7eNtcCOj&sig=>
9ALZkN9LJFLCK16BfmtUnuauYkM&hl=en#PPA121,M1
>
> You might be able to find somebody that has made an edge
> tracer for ImageJ
> already.
>
> -Sami Badawi
> http://www.shapelogic.org
>