Hello, every one

1) I load the "barbara" image in MATLAB using the following command:

load woman

It is saved in workspace as "X" and its matrix class is "double". Then, I define "Y" as follows:

Y = uint8 (X);

the "Y" class is "uint8". The elements in "X" and "Y" are the same but when I use "imshow(X)" and "imshow(Y)", the results are different. why?

********************************************************************

2) When I use commands "[AX HX VX DX] = dwt2(X,'haar')" and "[AY HY VY DY] = dwt2(Y,'haar')" the results are the same but matrix elements of AX, HX, VX, DX are not in the interval [0 - 255]. Is it true?

********************************************************************

3) I use the following commands to save 3 types of the image in the current directory.

imwrite (X, 'barbara.bmp');

imwrite (X, 'barbara.tif');

imwrite (X, 'barbara.jpg');

Then I read them and save into 3 different matrices, X1, X2 and X3 as follows:

X1 = imread ('barbara.bmp');

X2 = imread ('barbara.tif');

X3 = imread ('barbara.jpg');

After that I see X1=X2 but X1 and X3 are different. why?

********************************************************************

4) I uses "dwt2" function for X, X1,X2 and X3. The results are different. why? Which format of the image should be used for DWT?

I look forward to hearing from researchers who know the answers. Thank you.

More Majid Amini Valashani's questions See All
Similar questions and discussions