Filter recurring oscillation in 2D Data

3 views (last 30 days)
Konvictus177
Konvictus177 on 8 Sep 2021
Answered: William Rose on 8 Sep 2021
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 Comments
William Rose
William Rose on 8 Sep 2021
@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 on 8 Sep 2021
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.

Sign in to comment.

Answers (1)

William Rose
William Rose on 8 Sep 2021
@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!