필터 지우기
필터 지우기

Addition of all pixel values in image

조회 수: 5 (최근 30일)
Tricky
Tricky 2011년 11월 6일
hi.. How to add all pixel values in a image?

답변 (1개)

Walter Roberson
Walter Roberson 2011년 11월 6일
sum(YourImage(:))
I wonder, though, whether you really want to do that for RGB images? The sum per layer would tend to make more sense. That or converting the image to grayscale and summing the grayscale values.
Warning: your total is going to come out very different depending on whether the image is represented as floating point or uint8 or uint16. And if your image is pseudo-color, you would need to convert to RGB before you did the addition.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by