查看单个帖子
旧 2009-01-31, 03:51   #4
johnny8088
初级会员
 
注册日期: 2009-01-31
年龄: 45
帖子: 12
声望力: 17
johnny8088 正向着好的方向发展
默认 回复: [求助]关于matlab Otsu阈值分割中的阈值问题!!!

引用:
作者: daocaoren_508 查看帖子
用Otsu方法进行图像阈值分割:
I = imread('coins.png');
level = graythresh(I);
BW = im2bw(I,level);

可是求得的level为什么是0到1之间的数呢?
怎样求实际的阈值?

假如一个灰度图像每个像素点的灰度值是0到...


I cannot believe nobody answers this question.
I believe anybody seriously working on image processing uses Otsu's method a lot.
Yes, the threshold is between 0-1.
If you want the actual number, simply use this

actual_level=255*level;

Why the level is between 0-1? it is normalized because some image gray levels are not between 0-255. The gray levels can be in 0-2^(16)-1. So when normalized, the threshold is same for all types of images.

I wish this answers your question.
johnny8088 当前离线   回复时引用此帖