how to perform integerr to integer wavelet transform on a image
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Obuli Yuvaraj
el 2 de Abr. de 2013
Comentada: alisha ahmad
el 17 de Nov. de 2017
I have followed the steps in the lwr2 page of documentation but i hace error
My image size is 512 x 512
j=imread('F:\MAT WORK\COVER OBJECT\cranial scan.jpg');
>> haarint=liftwave('haar','int2int');
>> [cA cH cV cD]=lwt2(j,haarint);
??? Error using ==> plus
Integers can only be combined with integers of the same class, or scalar doubles.
Error in ==> lsupdate at 43 y = y + t(:,1:sx(2),:);
Error in ==> lwt2 at 106 case 'd' , H = H + lsupdate('r',L,liftFILT,DF,sH,LStype);
0 comentarios
Respuesta aceptada
HyperionZhou
el 15 de Mzo. de 2017
Editada: HyperionZhou
el 15 de Mzo. de 2017
Hi! I met the same problem. I found that data in image is uint8. And when we process lwt2, data must be double. Also, ' plus Integers can only be combined with integers of the same class, or scalar doubles.' shows that the problem lies in the type of data. So you just need to add these code:
j = double(j); [cA cH cV cD]=lwt2(j,haarint);
Also, cA, cH, cV, and cD are double. If you need process them in unsigned int, add this code:
cA = uint8(cA);
uint8() and double() won't change the data's value. However, if you try to use im2double, you will find that it changes. I am not sure about the reason, but I guess it just change the way to read the data instead keeping the value.
1 comentario
alisha ahmad
el 17 de Nov. de 2017
Dear HyperionZhou ! Thankyou so much for providing such a good explanation.It worked.
Más respuestas (1)
Wayne King
el 2 de Abr. de 2013
You should tell us more about your image. What is it's size and class?
Does the following work for you? It should.
liftscheme = liftwave('haar','int2int');
imdata = imread('ngc6543a.jpg');
[cA cH cV cD]=lwt2(imdata,liftscheme);
Ver también
Categorías
Más información sobre Image Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!