Filter recurring oscillation in 2D Data

조회 수: 3 (최근 30일)
Konvictus177
Konvictus177 2021년 9월 8일
답변: William Rose 2021년 9월 8일
Hi,
I am creating a 2D surface plot where I can see a diagonal pattern in my data. I see recurring oscillations which I would like to filter out from my original signal.
Andy advice on how this could be done without disturbing the original signal too much? I tried smooth, median, etc. without any success.
Thanks.
  댓글 수: 2
William Rose
William Rose 2021년 9월 8일
@Konvictus177, I do not see a diagonal oscillation in the image. I assume the plot is z(x,y). The z values appear to be identical at all y values, and z oscillates in the x direction. Therefor your image seems to be inconsistent with the question you have posed.
Show the code you tried, which did not produce the results you expected.
DGM
DGM 2021년 9월 8일
There is a very faint diagonal banding, though depending on how this plot/image were generated, it might just be aliasing due to display interpolation and the dominant features being slightly angled WRT the figure.

댓글을 달려면 로그인하십시오.

답변 (1개)

William Rose
William Rose 2021년 9월 8일
@DGM, @Konvictus177, I cannot see diagonal banding. The arrows added to th image point to a vertical line, not a diagnonal feature.
If I had unwanted parallel diagonal fluctuations across the entire image, I would do a 2D FFT, then zero out the unwanted frequencies on the appropriate diagonal in the frequency domain, then do the inverse 2D FFT.
If I had a single unwanted parallel diagonal fluctuation going across the image, I would try to fix it in the spatial domain. I would set up a for loop to proceed along the cenerline of the diagonal, replacing each point with the median of itself and the N points in a perpendicular direction on either side. Then I woudl repeat for the parallel set of points on either side of the centerline, etc. There are variaiton so on this approach that you could try, such as replacing 3 or more perpendicular-to-the-diagonal points at a time with the median of those 3 or more points.

Community Treasure Hunt

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

Start Hunting!

Translated by