How do I calculate the mean, maximum, minimum and std of the detected region of an image?
2 次查看(过去 30 天)
显示 更早的评论
detected region in binary image
2 个评论
回答(1 个)
Image Analyst
2013-9-7
Assuming img is your gray scale image, and BW is a binary image specifying the "detected region":
meanValue = mean(img(BW));
minValue = min(img(BW));
maxValue = max(img(BW));
stdDev = std(img(BW));
Those values refer to the values in your gray scale image, not the binary image.
3 个评论
Image Analyst
2013-9-8
编辑:Image Analyst
2013-9-8
My answer is very confusing now because you removed the edited the original subject and body so that it's now a totally different question. I'd recommend not doing that again. It would have been better to just add a followup question here or start a totally new discussion.
You're not using active contours and I don't even know what your loop is now trying to do. Are you trying to find the first and last place on each line where the binary image is true (1)? Or the distance between them?
Image Analyst
2013-9-8
That didn't answer my questions. I just sort of asked one of me. Do you still need help? If so, please state more clearly what you're after.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!