Using interpolation to restore corrupted image data?

4 ビュー (過去 30 日間)
Ella Kaplan
Ella Kaplan 2017 年 3 月 23 日
コメント済み: Stephen23 2017 年 3 月 23 日
So I'm trying to restore corrupted image data using interpolation and am having less than zero luck. I have tried a bunch of different things and none of them seem to help. Here's what I have right now which generates an image but it looks exactly the same as the original. Any suggestions? (The image data was given in a 195x1099 double)
paint=SanRomano;
sizeP=size(paint);
x=1:sizeP(1);
y=1:sizeP(2);
figure(3);
[xGrid,yGrid]=meshgrid(1:1:1099,1:1:195);
[xS,yS]=meshgrid(1:0.5:1099,1:0.5:195);
vq=interp2(xGrid,yGrid,paint,xS,yS,'cubic');
image(vq)

回答 (2 件)

Jan
Jan 2017 年 3 月 23 日
An interpolation is only useful for the restauration of an image, if the damaged pixles are identified at first an then replaced by the interpolation of the neigboring pixels. Currently your interpolation inserts only pixels between the existing pixels with their interpolated values. This means that you get the corrupted image with a finer resolution, but no substantial changes.
  2 件のコメント
Ella Kaplan
Ella Kaplan 2017 年 3 月 23 日
Is there a different method that would result in substantial changes?
Stephen23
Stephen23 2017 年 3 月 23 日
@Ella Kaplan: you need to identify the "corrupted" pixels, and interpolate new values at those positions. The interpolation is the easy part. Identifying the corrupt pixels is the hard part: start by using google scholar.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2017 年 3 月 23 日
編集済み: Walter Roberson 2017 年 3 月 23 日
If you replace the damaged pixels with nan then you could use John D'Errico file exchange contribution inpaint_nan

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by