matlab coding problem

Status
Not open for further replies.

priyanka24

Advanced Member level 4
Joined
Jan 19, 2011
Messages
100
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Location
India
Activity points
1,976
HI..

i want to read one image in matlab and want to apply dwt function on it and then want to convert it into 1 row matrix.
me not getting how to convert it into 1 row matrix.
my code is as follows


i = imread('cameraman.tif')
for(n=1:5)
A = (dwt2(i,'haar'))
end
n = max(max(A))
A1 = A/n
A2 = round(A1)
A3 = reshape(A2,1,65536)

but me getting error in reshape command as follows:

??? Error using ==> reshape
To RESHAPE the number of elements must not change.

Error in ==> image at 14
A3 = reshape(A2,1,64)


so plz anybody help me???????
 

Returns the number of element of A2 - it is equivalent to prod(size(A2))
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…