clear all; clc; x=imread('peppers','png'); disp( 'Displaying the input image...

'); clf; imagesc(x, [0, 255]); title( 'Input image' ) ; axis image off; colormap('gray'); input( 'Press Enter key to continue...' ) ; disp( ' ' ); nlevels = [1] ; pfilter = 'pkva' ; nfilter = 'pkva' ; y = pdfbdec( double(x), pfilter, nfilter, nlevels ); disp('Displaying the contourlet coefficients...') ; imcoeff = showpdfb( y ) ; disp(y); title('Contourlet coefficients'); input('Press Enter key to continue...' ) ; disp(' '); a=y; b=a{1,2}{1,1}; c=b; k=input('enter length'); input ('enter the data') for u=1:k g(u)=input(''); end l=0; for m=1:256 for n=1:2:512 l=l+1; if (l>k) break; end if (g(l)==1) if b(m,n)<b(m,n+1) temp=b(m,n); b(m,n)=b(m,n+1); b(m,n+1)=temp; end else if b(m,n)>b(m,n+1) temp=b(m,n); b(m,n)=b(m,n+1); b(m,n+1)=temp end end end end a{1,2}{1,1}=b; c = pdfbrec( a, pfilter, nfilter ) ; disp('Displaying the reconstructed image...') ; disp('It should be a perfect reconstruction' ) ; disp(' ') ;

imagesc( c. nfilter. nlevels ).com/Thread-steganography-in-matlab-using-conto urlet-transform#ixzz2P9EKyxPU . 255] ). mse = mse / prod(size(x)).p)<e(o. title('Reconstructed image' ) .double(x)). if (q>k) break.2. q=0. [0.1}. else f(q)=1. axis image off. subplot(1. axis image off.2}{1. [0.p+1) f(q)=0. imagesc( x. disp( sprintf('The mean square error is: %f'. d = pdfbdec( double©.2. e=d{1. mse = sum( sum( (c . end end end disp (f) Reference: http://seminarprojects. for o=1:256 for p=1:2:512 q=q+1. 255] ).2). title('Original image' ) .subplot(1. pfilter. mse ) ). end if e(o. disp(' ').^2 ) ).1).

Sign up to vote on this title
UsefulNot useful