[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Daubechies and images
From: |
Humberto Luiz Razente |
Subject: |
[Help-gsl] Daubechies and images |
Date: |
Thu, 21 Dec 2006 14:01:39 -0200 (BRST) |
User-agent: |
SquirrelMail/1.4.7 |
Hello,
I applied Daubechies on a gray scale 256*256 pixels image.
Considering pixels[][] is a matrix where each value is the
color of a pixel, the source code is:
============
gsl_wavelet *w = gsl_wavelet_alloc (gsl_wavelet_daubechies_centered, 4);
gsl_wavelet_workspace *work = gsl_wavelet_workspace_alloc (width *
height);
double *data = malloc (width * height * sizeof (double));
for (i = 0; i < width; i++)
for (j = 0; j < height; j++)
data[i * width + j] = pixels[i][j];
gsl_wavelet2d_nstransform (w, data, width, width, height, +1, work);
============
After running gsl_wavelet2d_nstransform, the data vector contains
the transformed data, but the values varies from -1466.34 to 8443.58
I tried to normalize the data using:
============
for (i = 0; i < width*height; i++)
data[i] = ((data[i] - lowestvalue) / (greatestvalue -
lowestvalue)) * 255;
============
and the result and original images can be seen in:
http://gbdi.icmc.usp.br/~humberto/daubechies.png
Does anybody have an idea of what am I doing wrong?
Thanks,
Humberto Razente
Brian Gough wrote:
===========================================================
Date: Mon, 18 Dec 2006 17:50:27 +0000
From: Brian Gough <address@hidden>
Subject: Re: [Help-gsl] Daubechies and images and CBIR
To: Humberto Luiz Razente <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Humberto Luiz Razente wrote:
> I'd like to extract Daubechies features from
> medical images for content based image retrieval (CBIR).
> Does anybody have an example using gsl?
> I couldn't understand how to do this in the reference manual
> and I couldn't adapt the example for images.
> Should I have read other documentation?
> I already opened the images and I have a matrix containing
> colors of the pixels.
I didn't see any replies on the list, but if anyone does have an example
of that I'd be glad to add it to the manual.
--
Brian Gough
(GSL Maintainer)
===========================================================
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] Daubechies and images,
Humberto Luiz Razente <=