Can any one give solution for removing ripples in below image

1 次查看(过去 30 天)

采纳的回答

Image Analyst
Image Analyst 2012-9-17
That looks like a combination of errors. The first problem looks like a demosaicing error. Then it underwent blurring. Try deblurring with blind deconvolution (deconvblind) or richardson lucy (deconvlucy) (Examples for both in the help), then try some ad hoc method to fix the demosaicing problem. Report back here with your code if you have problems.
  1 个评论
Sivakrishna
Sivakrishna 2012-9-17
编辑:Walter Roberson 2012-9-18
hi this is my deconvolution code..
function[deconv,psf]=blind_dconv(z,iterations,hesize,alpha,fe,k)
% clc,clear all
% close all
% a0=double(imread('cameraman.tif'));
% h = fspecial('motion',1);
%
% z = imfilter(a0,h,'replicate');
% figure,imshow(z,[])
% iterations=1;
% hesize=1;
% alpha=0.01;
% k=0.01;
% fe=10;
% if(mod(hesize,2)~=1)
% error('Size of psf must be odd');
% end
YSIZE=size(z,1);
XSIZE=size(z,2);
SIZEMAX=max([XSIZE YSIZE]);
%z is the linearly degraded image, fe is the image estimate, and k is the
%finite support. he is the PSF estimate.
%This is the PSF ESTIMATE (we estimate it as an impulse)
he=zeros(1,hesize);
he(ceil(hesize/2))=1;
he=he'*he;
G=fft2(z,(2*SIZEMAX),(2*SIZEMAX)); %z is the degraded image
n=0;
while(n<iterations)
Fe=fft2(fe,(2*SIZEMAX),(2*SIZEMAX));Hoe=fft2(he,(2*SIZEMAX),(2*SIZEMAX));
%impose fourier constraints
Hne=(G.*conj(Fe))./(abs(Fe).^2+(alpha./(abs(Hoe).^2)));
hne=ifft2(Hne);
%impose blur constraints
hne=abs(hne(1:hesize,1:hesize));
Hoe=fft2(hne,(2*SIZEMAX),(2*SIZEMAX));
%Impose Fourier constraints
Fne=(G.*conj(Hoe))./((abs(Hoe).^2+(alpha./abs(Fe).^2)));
fne=ifft2(Fne);
%impose image constraints
fne=abs(fne(1:YSIZE,1:XSIZE));
fne(~k)=0;
fe=abs(fne);he=abs(hne);
n=n+1;
end
deconv=fne;
psf=hne;

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by