how to interpolate/replace these values?

2 ビュー (過去 30 日間)
Dimitrios
Dimitrios 2014 年 10 月 4 日
回答済み: Image Analyst 2014 年 10 月 4 日
I got the following results from a calculation:
It can be seen that the first and the last row of the matrix are a bit off with the rest of the values.They are 'bad' values.Is there a way to 'fix' these values in a relation with the others?(in the same patern).

回答 (1 件)

Image Analyst
Image Analyst 2014 年 10 月 4 日
Sure. You can do a modified median filter. You take the median filter of the data. Then you identify outliers, like where the actual value is more than some value away from the median. For those that are outliers, you replace only those with the median value. I think that's what my salt and pepper noise removal demo (attached) does.
You definitely don't want interpolation or regression like you listed in the tags.
Alternatively, if you know for a fact that it is only the edges that have outliers and want to replace the whole row or column, you can just replace the edges with the next innermost column or row
data(end,:) = data(end-1,:); % Replace last row.
and so on for the other 3 edges.

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by