09-09-2007 08:08 AM
09-09-2007 10:47 PM
This may not be the most efficient way to get there, but I am pretty sure it would work:
First number the particles using IMAQ Label, then subtract the eroded particles. You should have all the boundary pixels with the number of the particle they belong to.
Convert the image to a 2D array, and loop through all the pixels. If the pixel is non-zero, add its coordinates to the appropriate contour array. This is kind of brute force, but it should do the job.
The only problem is if you need the coordinates in order. You should be able to write a sorting routine that would put the points in order, but that could be more complex than finding the coordinates to begin with.
Another possibility is taking the boundary segments from GetPointsOnContour, checking the endpoints and assembling the complete boundary curve.
Bruce
09-10-2007 04:09 AM
09-10-2007 09:51 AM - edited 09-10-2007 09:51 AM
Message Edited by KevinC on 09-10-2007 09:53 AM
09-11-2007 03:29 AM
09-11-2007 09:49 AM
10-24-2008 12:09 PM
Kudos!!! I was looking for it as well.
Instead of implementing that (ans most probably badly) it saved me a lot of work.
Thx a lot,
JPh
08-04-2009 02:04 PM