how to find the intensity of an image

2 vues (au cours des 30 derniers jours)
ramya raj
ramya raj le 8 Sep 2011
hai
i have to divide a image by the intensity of the original image
is there any command available in matlab for finding the intensity of an image

Réponses (3)

Grzegorz Knor
Grzegorz Knor le 8 Sep 2011

David Young
David Young le 8 Sep 2011
Please see my reply to your previous question. That also pointed you to rgb2gray. If rgb2gray is not the answer, you need to explain what you mean by image intensity.

Image Analyst
Image Analyst le 8 Sep 2011
It looks like you might be wanting to do flat field correction. I do this all the time, both on color and monochrome images. You need to convert both your "test" image and your "background" (what you call "original") image to single or double so that you don't get any clipping (due to them being integers). Then you need to convert your background image to an image where each pixel is the fraction of the max value. For example if your image is only 70% as bright at the corner, you're going to need to have 0.7 there and then divide your image by 0.7 there to being it up to what it should be. Something like this (untested):
fractionalImage = backgroundImage / max(max(backgroundImage));
flatImage = testImage / fractionalImage;
or something like that. The above is simplified. In reality you'll introduce noise by doing this so you'd want to get rid of that in your background image first. You can either blur the image or you can model it (like do a regression to fit it with a polynomial or some perfectly smooth function). This is a common correction for vignetting. For color you need to do each color channel independently (find the max for each channel) otherwise you're going to do some color rebalancing at the same time, which you don't want to do, since all you want to do is to correct for the non-uniformities in the illumination of your scene.

Catégories

En savoir plus sur Modify Image Colors dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by