graythresh dosn't work with variables other than uint8?
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Image Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!