From: Sprinceana on
I try to make a matlab file regarding only Forward Haar 2D Transform

http://www.ceremade.dauphine.fr/~peyre/numerical-tour/tours/wavelet_haar2d/

The problem is that it doesn' t load my grayscale image even if n=256 the levels of grey in a grayscale image called photo_grey. I don't understand why it doesn't display the grey_image even if it is placed in the pwd the photo.

Here is the full source:

I don't know also why it doesn't display the vertical and horizontal.


http://www.mediafire.com/?ayznymuoxm

Here is photo_grey.jpg that I want to display: (in figure2)

http://img13.imageshack.us/img13/7281/photogrey.jpg (the file is called photo_grey)

I tried load image('photo_grey'),n) or photo_grey.jpg but the grayscale image it doesn't display in figure 2.

I run haar_transf and it displays me only figure1 with the initial rgb image.

Then in figure3 (result for vertical) and in figure4 result for horizontal.

I don't know what I must correct to the code haar_wav.
From: Sprinceana on
Error in loading grayscale image in this line:

n = 256; % n is the number of gray levels in an image that is grayscale
M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale

Undefined function or method 'load_image' for input arguments of type 'char'.

Error in ==> exo3 at 2
M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale

I don't know the source of this error.
From: Wayne King on
"Sprinceana " <mihaispr(a)yahoo.com> wrote in message <hrrhqc$qac$1(a)fred.mathworks.com>...
> Error in loading grayscale image in this line:
>
> n = 256; % n is the number of gray levels in an image that is grayscale
> M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale
>
> Undefined function or method 'load_image' for input arguments of type 'char'.
>
> Error in ==> exo3 at 2
> M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale
>
> I don't know the source of this error.

Hi, Is load_image a function you wrote, or obtained from somebody? That error is because MATLAB cannot find the function load_image.

Also, the Wavelet Toolbox has a number of routines for obtaining 2D wavelet transforms of images.

Wayne
From: Sprinceana on
"Wayne King" <wmkingty(a)gmail.com> wrote in message <hrrjq4$5aq$1(a)fred.mathworks.com>...
> "Sprinceana " <mihaispr(a)yahoo.com> wrote in message <hrrhqc$qac$1(a)fred.mathworks.com>...
> > Error in loading grayscale image in this line:
> >
> > n = 256; % n is the number of gray levels in an image that is grayscale
> > M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale
> >
> > Undefined function or method 'load_image' for input arguments of type 'char'.
> >
> > Error in ==> exo3 at 2
> > M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale
> >
> > I don't know the source of this error.
>
> Hi, Is load_image a function you wrote, or obtained from somebody? That error is because MATLAB cannot find the function load_image.
>
> Also, the Wavelet Toolbox has a number of routines for obtaining 2D wavelet transforms of images.
>
> Wayne

Can you give me an example please? it's the first time I work with wavelet toolbox.

I want simply to store a statistical coefficient that describe how blury is my image (the degree of bluriness if it has a low value the image isn't blury if it has a high value that describe my image the image is blury.)

Any ideas would be really appreciated!
From: Wayne King on
"Sprinceana " <mihaispr(a)yahoo.com> wrote in message <hrrojt$kmj$1(a)fred.mathworks.com>...
> "Wayne King" <wmkingty(a)gmail.com> wrote in message <hrrjq4$5aq$1(a)fred.mathworks.com>...
> > "Sprinceana " <mihaispr(a)yahoo.com> wrote in message <hrrhqc$qac$1(a)fred.mathworks.com>...
> > > Error in loading grayscale image in this line:
> > >
> > > n = 256; % n is the number of gray levels in an image that is grayscale
> > > M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale
> > >
> > > Undefined function or method 'load_image' for input arguments of type 'char'.
> > >
> > > Error in ==> exo3 at 2
> > > M = rescale(load_image('photo_grey',n) ); % load the image that is already grayscale
> > >
> > > I don't know the source of this error.
> >
> > Hi, Is load_image a function you wrote, or obtained from somebody? That error is because MATLAB cannot find the function load_image.
> >
> > Also, the Wavelet Toolbox has a number of routines for obtaining 2D wavelet transforms of images.
> >
> > Wayne
>
> Can you give me an example please? it's the first time I work with wavelet toolbox.
>
> I want simply to store a statistical coefficient that describe how blury is my image (the degree of bluriness if it has a low value the image isn't blury if it has a high value that describe my image the image is blury.)
>
> Any ideas would be really appreciated!

Hi, without knowing how you plan to use the detail coefficients to measure blur, you can obtain the horizontal, vertical, and diagonal details with:

load woman
[c,s] = wavedec2(X,3,'db1'); %db1 is the Haar
[H1,V1,D1] = detcoef2('all',c,s,1); %details at level 1 (finest resolution)
[H2,V2,D2] = detcoef2('all',c,s,1); % details at level 2

Wayne
 |  Next  |  Last
Pages: 1 2 3
Prev: battery controller
Next: help with unique function