How to use filter

10 ビュー (過去 30 日間)
Siam
Siam 2014 年 8 月 28 日
コメント済み: Image Analyst 2014 年 9 月 8 日
Hi all,
I am new to Matlab. I need to know how to use a filter to eliminate non-uniformity in an image.
  11 件のコメント
Siam
Siam 2014 年 9 月 7 日
How to measure window size?
Image Analyst
Image Analyst 2014 年 9 月 8 日
Use trial and error until you get some output that you're happy with.

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

採用された回答

Image Analyst
Image Analyst 2014 年 8 月 28 日
Siam, you really need to understand what process gave rise to the non-uniform background. This will help you decide what algorithm to use. But there are rules of thumb. For most situations finding the background and then dividing the image by the background is the proper way to go. For certain other instances (radiology, fluorescence microscopy, etc.) background subtraction is the best way. The best way to get a background is to snap a "blank shot" of just the background with no sample(s) in there are all. If you have samples in there, you can try to get rid of them by morphology (opening or closing) or just a global fitting. Morphology can follow local variations better than regression but can introduce undesirable artifacts. What I do is to fit the image of a uniform background to a 2D polynomial and then divide - that's what works best in my situation. You can do a local regression with a Savitzky-Golay filter but I find that in most cases where you're illuminating something with a lamp, the uneven light pattern is very broad and smooth and does not vary on a rapid basis, so a process that scans the image with a small local window just ends up giving you noise. A global fit will totally and effectively remove all video noise. See my attached demo where I use John D'Errico's polyfitn (which you need to get from the File Exchange here - be sure to check out John's other useful utilities while you're there.
For color images, usually you want to convert to HSV and correct only the V channel. This will avoid color artifacts that you might get if you correct the red, green, and blue channels independently.
I also attach a Savitky-Golay filter but it just does it in each direction and is not what you'd get if you did a true 2D fit at every window location, which you can again use John's polyfitn() for if you want/need to follow background non-uniformities more closely.
  8 件のコメント
Image Analyst
Image Analyst 2014 年 8 月 28 日
Remove your slide with your sample on it (the cells or whatever). Just put in a totally clean slide and take a picture of the light coming through.
Image Analyst
Image Analyst 2014 年 8 月 29 日
Why do you think you need to correct for background anyway? What do you actually want to measure?

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

その他の回答 (1 件)

Spandan Tiwari
Spandan Tiwari 2014 年 8 月 28 日
The classical homomorphic filtering might be able to help here. See the following blog post on the blog Steve on Image Processing for details.
  3 件のコメント
Image Analyst
Image Analyst 2014 年 8 月 29 日
Yes, Basically it assumes that the really, really blurred version of the image is the background or illumination pattern.
Siam
Siam 2014 年 8 月 29 日
Thank you for your suggestion.

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

Community Treasure Hunt

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

Start Hunting!

Translated by