Click to See Complete Forum and Search --> : trace out boundaries of image regions


Vanderbilt
December 14th, 2006, 05:04 PM
Hi,

I am doing projects on trace out boundaries of image regions(multiple
regions of a image, already labelled by segmentation algorithm.).
I know there are matlab functions (bwtraceboundary, bwboundaries) do
this, but it is for biinary images only. What I want is working on
color-segmented region, tracing out boundaries of every one of the
regions. And the sequence of boundary pixels must be ordered(clock-
wise/or otherwise) as well.

Is there efficient algorithms/c code can do this?
Thanks!

yiannakop
January 3rd, 2007, 08:28 AM
Hi. The image regions are already labelled using a unique number I guess. So your segmentation algorithm leads to a thresholded (multiple threshold) image. Therefore you have a MxN matrix I (the threholded image) taking values 1...S, where S is the number of regions, right? Since the functions bwtraceboundary, bwboundaries find the boundaries ONLY for binary images what you can do is to run those functions S times, each time on a binary image which is created from I for the respective region. That is, you have to break your problem into S binary subproblems, each one solved by a call to the above functions. :wave:

Vanderbilt
January 3rd, 2007, 09:39 AM
Thanks, Yiannakop
That's what I am doing right now!
Shufei