Project Code

download Project Code

If you can't read please download the document

description

p

Transcript of Project Code

clcclear allstepsize =0.0001;N=8;D = dctii(N);rho = 0.95;Rxx = toeplitz(rho.^[0:2*N-1]);D_e = D([1:2:N-1],:);D_o = D([2:2:N],:);J = fliplr(eye(N));K = (D_e - D_o)';%Matrix "P" feasible from the DCTP = 0.5 * [K, K; J*K, -J*K];A = P' * Rxx * P;[Z,V,D] = svd(A);Z = Z./repmat(sum(Z.^2),[size(Z,1),1]);P0 = P * Z;% Plbt = Plbt*Z;% Plbtback = Plbtback * Z;P1 = P0(5:16,:);P2 = P0(1:12,:);for k=1:4 P1(k,:) = P0(5-k,:) + P0(4+k,:); P2(k+8,:) = P0(k+8,:) + P0(17-k,:);end% out = lot_trans3(im,P0);%image read of size 512 512 in = imread('image1.jpg'); in=double(in); figure; imagesc(in) colormap(gray);% in = rgb2gray(in);N = 8;[a,b] = size(in)%if nargin