How to remove noise from a plot?

2 ビュー (過去 30 日間)
Sean
Sean 2015 年 2 月 24 日
コメント済み: Sean 2015 年 2 月 25 日
I've created a function to detect white edges in an image. This plot is a segment in an image (post processing of my function). The example above has a lot of noise in it, as you can see the segment I'm trying to plot is quite consistent along the 220 mark (y axis) and the large peaks (mostly above) represent noise, there are a few below also. Is there a function or some sort of way I can remove these large peaks? the function works quite well for the majority of images I'm using, data such as above is one of an awkward bunch.

採用された回答

Image Analyst
Image Analyst 2015 年 2 月 24 日
You can make it a bit more robust, but how about just thresholding, then interpolate what's left with interp1
badElements = signal > 230 | signal < 215;
newY = y(~badElements);
newX = x(~badElements);
xq = x;
fixedY = interp1(newX, newY, xq);
It would have been better if you had attached your data so people could have tried things.
  5 件のコメント
Sean
Sean 2015 年 2 月 25 日
the image is greyscale so the plot is 2D also, thanks again for the help.
Sean
Sean 2015 年 2 月 25 日
s 1024x1 8192 double

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by