[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] connected component analysis with GSL?
From: |
Dan Lenski |
Subject: |
[Help-gsl] connected component analysis with GSL? |
Date: |
Tue, 9 Mar 2010 15:58:24 +0000 (UTC) |
User-agent: |
Pan/0.133 (House of Butterflies) |
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] connected component analysis with GSL?,
Dan Lenski <=