How to calculate the background intensity of grayscale image?

4 次查看(过去 30 天)
How do i calculate the background intensity at each pixel of an grayscale image

采纳的回答

Image Analyst
Image Analyst 2017-9-11
It depends. If you can, just snap an image without your foreground in there. Like if it's a hand in front of a white sheet, snap a photo of just the white sheet alone, without the hand in there. If you can't do that and need to estimate the background from the actual image, then try to identify the foreground and use some algorithm to fill in those pixels with background, like use regionfill(), or fit the whole background mask to a 2-D polynomical, or use some morphological methods, etc. You forgot to attach your image(s) so I can't really offer better advice.
  1 个评论
Image Analyst
Image Analyst 2017-9-13
Since you don't know for certain the background behind the person, the easiest way is to simply take a photo of the background without any person there. Only that way can you know what the background intensity of every pixel in the image is. Otherwise you'd be guessing. It should be easy to get that image without a person in the image, right?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by