필터 지우기
필터 지우기

DWT matlab code for image watermarking

조회 수: 6 (최근 30일)
TJ Singh
TJ Singh 2012년 4월 5일
can any1 tell me the code for image watermarking for gray scale images in DWT domain ? i'm working on this. i've found many codes on net but they can't work properly.
  댓글 수: 1
madhuri
madhuri 2012년 4월 13일
I have the same problem.I also want a running code for dwt and dwt-svd matlab code for my project work.plz help me as im in a gr8 need.my id is : engr.madhuri@gmail.com

댓글을 달려면 로그인하십시오.

답변 (1개)

ajith
ajith 2012년 9월 13일
function [I_W , S] = func_DWT(I, level, Lo_D, Hi_D); % Matlab implementation of SPIHT (without Arithmatic coding stage) % % Wavelet decomposition % % input: I : input image % level : wavelet decomposition level % Lo_D : low-pass decomposition filter % Hi_D : high-pass decomposition filter % % output: I_W : decomposed image vector % S : corresponding bookkeeping matrix % % please refer wavedec2 function to see more
[C,S] = func_Mywavedec2(I,level,Lo_D,Hi_D);
S(:,3) = S(:,1).*S(:,2); % dim of detail coef nmatrices
L = length(S);
I_W = zeros(S(L,1),S(L,2));
% approx part I_W( 1:S(1,1) , 1:S(1,2) ) = reshape(C(1:S(1,3)),S(1,1:2));
for k = 2 : L-1 rows = [sum(S(1:k-1,1))+1:sum(S(1:k,1))]; columns = [sum(S(1:k-1,2))+1:sum(S(1:k,2))]; % horizontal part c_start = S(1,3) + 3*sum(S(2:k-1,3)) + 1; c_stop = S(1,3) + 3*sum(S(2:k-1,3)) + S(k,3); I_W( 1:S(k,1) , columns ) = reshape( C(c_start:c_stop) , S(k,1:2) );
% vertical part
c_start = S(1,3) + 3*sum(S(2:k-1,3)) + S(k,3) + 1;
c_stop = S(1,3) + 3*sum(S(2:k-1,3)) + 2*S(k,3);
I_W( rows , 1:S(k,2) ) = reshape( C(c_start:c_stop) , S(k,1:2) );
% diagonal part
c_start = S(1,3) + 3*sum(S(2:k-1,3)) + 2*S(k,3) + 1;
c_stop = S(1,3) + 3*sum(S(2:k,3));
I_W( rows , columns ) = reshape( C(c_start:c_stop) , S(k,1:2) );
end

카테고리

Help CenterFile Exchange에서 Discrete Multiresolution Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by