Eliminate Noise from an Image in MATLAB

  • Context: MATLAB 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Image Matlab Noise
Click For Summary

Discussion Overview

The discussion revolves around methods to eliminate noise from binary images in MATLAB, particularly focusing on a specific case where participants are trying to process an image with unwanted noise. The scope includes technical explanations, proposed algorithms, and potential applications of various image processing techniques.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests deleting vertical lines longer than a specified length to reduce noise, followed by curve fitting to find the best line through remaining points.
  • Another participant questions the transformation from the original noisy image to the processed version, proposing a low-pass filter on the FFT as a potential solution.
  • Participants express confusion regarding the terminology used to describe the images and the steps taken to process them.
  • A participant outlines their specific steps for transforming the noisy image, which involves creating a row vector and selecting the lowest cell value from each column.
  • There is a suggestion that reducing the cut-off on height differences can significantly decrease noise while retaining important information.
  • Another participant describes the context of their project, which involves capturing and processing surface profiles, and mentions various methods to reduce noise, including changing scan controls and using different imaging techniques.
  • One participant introduces the concept of persistent homology as a mathematical approach to distinguish between signal and noise in data.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method to eliminate noise, and multiple competing views and techniques are presented throughout the discussion.

Contextual Notes

Some participants express uncertainty about the definitions and steps involved in the noise reduction process, indicating that assumptions may not be fully clarified. The discussion also highlights the complexity of balancing noise reduction with the preservation of relevant data.

member 428835
Hi PF!

Attached is a binary image I have in MATLAB, where I have drawn an error pointing to some noise. Does anyone know of a systematic way to eliminate all noise below this line (or basically what appears to be the line)?

I also uploaded the same image only processed, titled Noise1. This shows the same problem at a later stage (my actual problem). I would like to know how to address both if anyone can help.

Thanks!
 

Attachments

Last edited by a moderator:
Physics news on Phys.org
noise1.pn.png


Any vertical line longer than some specified small value is deleted . You will lose a point on the curve for each line deleted . Use curve fit then to get best true line through remaining points .
 
Last edited:
What's the transform to go from noise to noise1 ?

Wouldn't a simple low-pass filter on the FFT remove most of the noise in noise.pdf ?
 
@joshmccraney : What is the actual project that you are working on ?
 
Last edited:
BvU said:
What's the transform to go from noise to noise1 ?

Wouldn't a simple low-pass filter on the FFT remove most of the noise in noise.pdf ?
What do you mean noise to noise1? I'm just confused here, sorry.

Nidum said:
@joshmccraney : What is the actual project that you are working on ?
The actually project is kind of difficult to explain, but what I'm trying to do here is remove those far out data points. Does this answer the crux of your question or do you actually want to know the details of what I'm working on?
 
joshmccraney said:
or do you actually want to know the details of what I'm working on?

Yes please .
 
Nidum said:
Yes please .
I'll PM you!
 
joshmccraney said:
What do you mean noise to noise1? I'm just confused here, sorry.

The actually project is kind of difficult to explain, but what I'm trying to do here is remove those far out data points. Does this answer the crux of your question or do you actually want to know the details of what I'm working on?
Noise.pdf is one picture. Noise1.pdf is a totally different picture. Your own nomenclature. What do you do to transform noise.pdf into noise1.pdf ?
I really don't know how to ask differently.
 
BvU said:
Noise.pdf is one picture. Noise1.pdf is a totally different picture. Your own nomenclature. What do you do to transform noise.pdf into noise1.pdf ?
I really don't know how to ask differently.
Ohhhhhh shoot sorry, I totally spaced this! Okay I see, here are my steps:
1) from the image Noise, I create a row vector of 1's above the maximum of the meniscus
2) I tell MATLAB to grab the lowest cell value that is a 1 from each column
3) Noise1 plots these results
 
  • #10
joshmccraney said:
2) I tell MATLAB to grab the lowest cell value that is a 1 from each column
So scoring a blank instead of 212 (or whatever the max ##h## is) gets rid of 97% of the noise.
A cut on ##\Delta h## from one ##z## to the next gets rid of the droopers.
Basically as @Nidum already proposed.

Not so sure you want to do much more so as not to cut into actual information -- depends on your purpose (do you want the low frequencies, the high frequencies, both, ...)
 
  • #11
(1) A photograph is taken in an experiment where the profile of a surface has to be recorded and measured .

A MATLAB routine is used to process the photograph and extract a bitmap image of the required surface profile .

The MATLAB routine traces the surface profile reasonably well but also generates or does not supress a large amount of image noise .

(2) A solution to the problem may be to strip off the spurious image components .

(3) There may be ways of changing the scan controls of the MATLAB routine to reduce the noise levels .

(4) Other possibilities :

Hand tracing .

CAD scanner.

Masked images for the scan process .

Sequence of photographs or a short video rather than a single frame .

Travelling microscope or laser scanner for direct recording and measurement .
 
  • #13
How do you recommend to "strip off" spurious components, or "store a blank"? I'm using a matrix so I can't have empty values.
 
  • #14
As in #2
 
  • #15
Any possibility of taking photographs in low light conditions but with a slit light source which just picks out the surface profile ? Should produce an image with very high contrast . Basically a white line which is the profile against a dark background . Much easier to get a good trace then .
 
  • #16
EDIT :Just throwing something in case you ( or anyone else) is/are familiar with it : Persistent Homology?

http://www.sci.utah.edu/~beiwang/teaching/cs6170-spring-2017/Scribe11.pdf

https://en.wikipedia.org/wiki/Persistent_homology

You assign a mathematical object, a Topological space to your data , which inlcludes a "filtration" at different levels of resolution. The n data that "persists" at enough consecutive levels of resolution is the signal and the data that does not persist is noise. I am learning it at this point. Attaching this Mathematical/Topological
space allows you to use all the existing associated machinery.

The idea/skill , of course, is to attach the correct type of object and correctly define the levels of resolution, of course, all depending on the problem at hand.
 
Last edited:

Similar threads

  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
8K