## how to perform integerr to integer wavelet transform on a image

### Obuli Yuvaraj (view profile)

on 2 Apr 2013

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);

## Products

### Wayne King (view profile)

on 2 Apr 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');
[cA cH cV cD]=lwt2(imdata,liftscheme);```

Obuli Yuvaraj

### Obuli Yuvaraj (view profile)

on 2 Apr 2013

my image is a medical image It's class is uint8

Thank you for yur response sir

Obuli Yuvaraj

### Obuli Yuvaraj (view profile)

on 2 Apr 2013

I'm sorry Wayne

??? 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);

Inference: I don't understand what is cell type and whether it is of standard 3 x 3 array

My Objective: Transform the 512 x 512 medical image of uint8 class using the DWT (dwt2 matlab command). this results in double type co-efficients.But the images gets degraded after the transformation.In orrder to get the co-efficients in integer form i ought to use Integer wavelet transform.

Walter Roberson

### Walter Roberson (view profile)

on 8 Apr 2013

```class(imdata)
class(liftscheme)
```

#### Join the 15-year community celebration.

Play games and win prizes!

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi