Stephen DiVerdi
2006-04-23 20:07:51 UTC
Moving on, I'm now working on thinning / skeletonizing a binary image.
I'm surprised to find that OpenCV doesn't already have support for this
type of operation, and the comments on the mailing list archive seem to
say nothing more than "use erode" which isn't really a satisfactory answer
- cvErode definitely does not have the same behavior as thinning.
Here are the two pages I've been looking at for information on how to
impelement this technique:
http://www.cee.hw.ac.uk/hipr/html/thin.html
http://www.cee.hw.ac.uk/hipr/html/skeleton.html
As the first page shows, to do thinning using a morphology style operator,
you need hit-and-miss morphology support, which OpenCV doesn't have. I'd
also prefer not to use an iterative algorithm, so I decided to go with the
second option, the Medial Axis Transform. cvDistTransform does the first
step of the work for me, but once I have a distance image, I need to
reliably extract the ridges from that image, and that's where I'm having
trouble.
My thought was that since I'm looking for ridges, the negative values of a
laplacian filter would do the trick, which is not altogether incorrect,
but does lend itself to noise / fragmented edges. I haven't been able to
get satisfactory results with it. Does anyone have any suggestions on
what might be a better way to proceed here? Either with extracting ridges
from the distance transform, or another approach that OpenCV does actually
support that I missed?
Thanks!
-stephen diverdi
-***@cs.ucsb.edu
Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com
I'm surprised to find that OpenCV doesn't already have support for this
type of operation, and the comments on the mailing list archive seem to
say nothing more than "use erode" which isn't really a satisfactory answer
- cvErode definitely does not have the same behavior as thinning.
Here are the two pages I've been looking at for information on how to
impelement this technique:
http://www.cee.hw.ac.uk/hipr/html/thin.html
http://www.cee.hw.ac.uk/hipr/html/skeleton.html
As the first page shows, to do thinning using a morphology style operator,
you need hit-and-miss morphology support, which OpenCV doesn't have. I'd
also prefer not to use an iterative algorithm, so I decided to go with the
second option, the Medial Axis Transform. cvDistTransform does the first
step of the work for me, but once I have a distance image, I need to
reliably extract the ridges from that image, and that's where I'm having
trouble.
My thought was that since I'm looking for ridges, the negative values of a
laplacian filter would do the trick, which is not altogether incorrect,
but does lend itself to noise / fragmented edges. I haven't been able to
get satisfactory results with it. Does anyone have any suggestions on
what might be a better way to proceed here? Either with extracting ridges
from the distance transform, or another approach that OpenCV does actually
support that I missed?
Thanks!
-stephen diverdi
-***@cs.ucsb.edu
Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-***@yahoogroups.com