Code covered by the BSD License

# GUI for denoising video signals with Kalman filter

### Youssef Khmou (view profile)

filter grayscale video signals(avi || Webcam) with 1st Order Estimation & Kalman filter .

Estimation(X)
```function Y= Estimation(X)

% Normalize the data : covert data to Double
if ~isa(X,'double')
X=double(X)./255;
end
if max(X(:)) > 1.00
X=X./255.00;
end

n=size(X,1);
p=size(X,2);
m=size(X,3);
Y=double(zeros(size(X)));
% Estimation
% =========================================================================
% ========each position (x,y,z) is estimated by surrounding cube of other
%neighbor positions========================================================
% Intial anf Final Estimations : X(t_0) and X(t_final)
for i=2:n-1
for j=2:p-1
Y(i,j,1)   = (  X(i-1,j,1)+X(i+1,j,1)+X(i,j-1,1)+X(i,j+1,1) ) ./ 4;
Y(i,j,end) = (  X(i-1,j,m)+X(i+1,j,m)+X(i,j-1,m)+X(i,j+1,m) ) ./ 4;
end
end

for i=2:n-1
for j=2:p-1
for k=2:m-1
Y(i,j,k)= (( X(i+1,j-1,k) + X(i+1,j,k)+ X(i+1,j+1,k)+X(i,j-1,k)+...
X(i,j+1,k)+X(i-1,j-1,k)+X(i-1,j,k)+...
X(i-1,j+1,k) ) + (X(i+1,j-1,k-1) + X(i+1,j,k-1)+ X(i+1,j+1,k-1)+X(i,j-1,k-1)+...
X(i,j+1,k-1)+X(i-1,j-1,k-1)+X(i-1,j,k-1)+...
X(i-1,j+1,k-1) ) + (X(i+1,j-1,k+1) + X(i+1,j,k+1)+ X(i+1,j+1,k+1)+X(i,j-1,k+1)+...
X(i,j+1,k+1)+X(i-1,j-1,k+1)+X(i-1,j,k+1)+...
X(i-1,j+1,k+1) ) )./26;
end
end
end

return

%==========================================================================
```

Contact us