matlab,image-processing,wavelet,dwt

I'm curious as to why you can't use dwt2 for computing the 2D DWT of images. What you have there is a lot more work than what you should be doing. dwt2 is much more suitable to do what you want. You'd call dwt2 like so: [LL,LH,HL,HH] = dwt2(X,Lo_D,Hi_D); X...

Your compression scheme is lossy, which means that you irreversibly lose some information in compressing your data. Specifically, jpeg compression transforms the pixel data to the frequency domain and zeroes out many high frequency components. The DWT detailed coefficients (LH, HL and HH) have some parallels to frequency coefficients and...

[Uh,Sh,Vh]=svd(Ih); [Uw,Sw,Vw]=svd(double(watermark)); When you run svd, the resultant matrix Sh has the same dimensions as Ih, and resultant Sw has the dimensions as watermark. http://www.mathworks.com/help/matlab/ref/svd.html Now, Shw=Sh+a*Sw; you are adding 2 matrices together. Matrix addition requires that the matrices you are adding together have the same dimensions (same number of...

Typing help randi, you find out that randi(IMAX) will return a scalar, which will be an integer uniformly distributed (based on a prng) in the range 1:IMAX. To put simply, it chooses a random integer between 1 and IMAX. numel(matrix) returns the total number of elements in the matrix. So,...