Hi, I am trying to write a program to clean up small dust specks in scanned TIFF images. I wrote this first in Python/SciPy, but it's rather slow unfortunately.
I was hoping to reimplement it using Libtiff and GSL, in C. I was wondering if GSL has any routines for connected component analysis. E.g., given a matrix/array that looks like this: A = [[ 0 1 1 0 1 0 0 2 2 2 1 1 1 1 0 0 3 3 2 2 ]] ... I'd like generate a labeled structure that looks something like this: labels = [[ 0 1 1 0 2 0 0 3 3 3 4 4 4 4 0 0 5 5 6 6 ]] ... where each contiguous (4- or 8-way connected) region of non-zero has been given its own label. I googled around, but did not find much. Does anyone know of some open- source code to do this in GSL? I suppose I could re-invent the wheel, but would rather not if I can avoid it. Thanks for any pointers! Dan _______________________________________________ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl