help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] connected component analysis with GSL?


From: Carlos Medrano
Subject: Re: [Help-gsl] connected component analysis with GSL?
Date: Wed, 10 Mar 2010 18:50:07 +0100
User-agent: KMail/1.9.10

Hi,

 Well, this is not a GSL solution, but may be the following can help you. Once 
I had a similar problem. I was working with openCV and I couldn't find a  
function like the 'bwlabel' function of Octave or Matlab. May be it is 
implemented in openCV, but ... I spent some time and I didn't get it.

 So I just took the function bwlabel.c from Octave (well, from its image 
processing package) and I adapted it from the openCV data type. It took me a 
few hours. I was interested only in binary input images. You should check the 
behaviour with gray images.

 Best regards:

Carlos Medrano

On Wednesday 10 March 2010 18:02:15 address@hidden wrote:
> Send Help-gsl mailing list submissions to
>       address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
>       http://lists.gnu.org/mailman/listinfo/help-gsl
> or, via email, send a message with subject or body 'help' to
>       address@hidden
>
> You can reach the person managing the list at
>       address@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-gsl digest..."
>
>
> Today's Topics:
>
>    1. connected component analysis with GSL? (Dan Lenski)
>    2. connected component analysis with GSL? (Dan Lenski)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 9 Mar 2010 15:58:24 +0000 (UTC)
> From: Dan Lenski <address@hidden>
> Subject: [Help-gsl] connected component analysis with GSL?
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=UTF-8
>
> 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
>
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 9 Mar 2010 17:48:56 +0000 (UTC)
> From: Dan Lenski <address@hidden>
> Subject: [Help-gsl] connected component analysis with GSL?
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=UTF-8
>
> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>
>
> End of Help-gsl Digest, Vol 77, Issue 6
> ***************************************






reply via email to

[Prev in Thread] Current Thread [Next in Thread]