How to calculate the background intensity of grayscale image?
2 views (last 30 days)
Show older comments
How do i calculate the background intensity at each pixel of an grayscale image
0 Comments
Accepted Answer
Image Analyst
on 11 Sep 2017
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 Comment
Image Analyst
on 13 Sep 2017
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?
More Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!