implementing pre-whitening learning rule.

2 views (last 30 days)
Tanvi
Tanvi on 4 Dec 2014
i am applying pre-whitening in my project and my loop is going infinite.I am applying learning rule. kindly help me. My code is:
clc; clear all; i1=imread('t1.jpg'); i2=rgb2gray(i1); p=imresize(i2,[128 128]); p1=reshape(p,1,16384); subplot(4,4,1) imshow(p); k1=kurtosis(double(p1(:))); i3=imread('t2.jpg'); i4=rgb2gray(i3); q=imresize(i4,[128 128]); q1=reshape(q,1,16384); subplot(4,4,2) imshow(q); k2=kurtosis(double(q1(:))); i5=imread('t3.jpg'); i6=rgb2gray(i5); s=imresize(i6,[128 128]); s1=reshape(s,1,16384); subplot(4,4,3) imshow(s); k3=kurtosis(double(s1(:))); c=rand(3,3); subplot(4,4,4) imshow(c) k3=kurtosis(double(c(:))); k=[k1 k2 k3]; s2=[p1; q1; s1]; a=5; b=10; a1=unifrnd(a,b,3,3); x=a1*double(s2); y=c*x; z=c*y; t1=z(1,:); t2=z(2,:); t3=z(3,:); y1=reshape(t1,128,128); y2=reshape(t2,128,128); y3=reshape(t3,128,128); %colormap(gray) subplot(4,4,5) imagesc(y1); subplot(4,4,6) imagesc(y2); subplot(4,4,7) imagesc(y3); v2=rand(3,3); % from here the code is of pre-whitening. v=v2*z I=[1,0,0;0,1,0;0,0,1]; % while (cov(v*v')~=I) % V=V+0.5*[I-(v*v')]; % v=V*z; % end % c=cov(v*v'); t=1; while(c~=I) v=v2+0.5*[I-(v*v')] v=v*z c=v*v'; end v=v1*z

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!