The number of distint intensity (gray) values in an gray scale image matlab code?

조회 수: 2 (최근 30일)
for my work, i need the number of intensity values in gray scale image. for example, consider an image a=[100,120;23,100]. the number of intensity values is 3. i need matlab code for the same.

답변 (1개)

Guillaume
Guillaume 2016년 5월 17일
Simply count the number of unique values in your image:
numel(unique(a))

카테고리

Help CenterFile Exchange에서 Modify Image Colors에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by