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

1 回表示 (過去 30 日間)
somasekar jalari
somasekar jalari 2016 年 5 月 17 日
回答済み: Guillaume 2016 年 5 月 17 日
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 Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by