フィルターのクリア

graythresh dosn't work with variables other than uint8?

1 回表示 (過去 30 日間)
Jorge Rivé
Jorge Rivé 2018 年 10 月 12 日
Say I have a matrix B (some image):
B=[1 2 3 ;5 6 7 ; 10 11 12;14 56 45];
if the B is defined as uint8, graythresh returns a level:
level=graythresh(B)
ans =
0.1137
But, if B is defined as a uint16 or double (which the documentation says it supports), it returns 0.
B= uint16(B)
B =
4×3 uint16 matrix
1 2 3
5 6 7
10 11 12
14 56 45
level=graythresh(B)
level =
0
What is going on? Thank you.

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by