I need to compute a background model using the information below can someone please help me in understanding and implementing the idea below

1 次查看(过去 30 天)
To compute this background model all of the pixels in the image are histogrammed-namely, for each pixel its color intensity is placed in the proper bin of a preferred possible 256 intensity levels. This is preferably done for each of the red, green and blue (RGB) channels thus generating three separate histograms. Alternately, one histogram could be generated using some joint space rep- resentation of the channels. Once the histogram has been computed, a Gaussian distribution for each histogram is calculated to provide the mean pixel intensity of the background and the vari- ance.

回答(1 个)

Image Analyst
Image Analyst 2012-8-2
编辑:Image Analyst 2012-8-2
Depends on what your background image is. I use polyfitn ( http://www.mathworks.com/matlabcentral/fileexchange/34765-polyfitn) to get a smooth illumination profile that I can use to correct for non-uniform lighting. But if you had, say a street scene with a bunch of people on it, then you wouldn't use that method, you'd take the mode or use GMM models or something.
I don't see how your proposed method would work at all. I don't even know what it does, except maybe get the mean color of the image, but you don't need to fit histograms to Gaussians to do that, or even to take histograms at all. Basically your method is just the same as:
meanRedValue = mean(rgbImage(:,:,1));
meanGreenValue = mean(rgbImage(:,:,2));
meanBlueValue = mean(rgbImage(:,:,3));
That's all your algorithm does, which is not even as locally adaptive as a blurring with conv2(). That's not really background correction at all.
  7 个评论
Maria
Maria 2012-8-4
Can you give me a complete code for this since I am completely blank now.I need to do this for couple of images not for a single image. I have lets say 10 images and I have to compute background model this way using all 10 images.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by