Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
回复
 
主题工具 显示模式
旧 2008-12-22, 21:22   #1
daocaoren_508
初级会员
 
注册日期: 2008-12-22
年龄: 42
帖子: 3
声望力: 0
daocaoren_508 正向着好的方向发展
默认 [求助]关于matlab Otsu阈值分割中的阈值问题!!!

用Otsu方法进行图像阈值分割:
I = imread('coins.png');
level = graythresh(I);
BW = im2bw(I,level);

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

假如一个灰度图像每个像素点的灰度值是0到255之间,用最大类间方差法求得的阈值也应该是0到255之间的一个数,为什么会是0到1之间呢? 怎样求得实际阈值呢?

例如:灰度图像img的矩阵如下:
img =
[ 0 0 0.1000 10.0000 11.0000
9.0000 7.0000 250.0000 224.0000 234.0000
8.0000 6.0000 219.0000 220.0000 1.0000
255.0000 233.0000 7.0000 6.0000 2.0000 ]
>> level = graythresh(img);
求得阈值:
level =0.5490
但是将上述图像的像素点分为两类的阈值很明显应该是11和219之间的一个数!!!???
有点糊涂了~~~~~~~~~~~~~~~~~~~~~~~~~~~
daocaoren_508 当前离线   回复时引用此帖
旧 2008-12-23, 09:20   #2
daocaoren_508
初级会员
 
注册日期: 2008-12-22
年龄: 42
帖子: 3
声望力: 0
daocaoren_508 正向着好的方向发展
默认 回复: [求助]关于matlab Otsu阈值分割中的阈值问题!!!

有人能帮忙解释一下吗? 看起来好像不是很难的问题~~
daocaoren_508 当前离线   回复时引用此帖
旧 2008-12-23, 19:25   #3
daocaoren_508
初级会员
 
注册日期: 2008-12-22
年龄: 42
帖子: 3
声望力: 0
daocaoren_508 正向着好的方向发展
默认 回复: [求助]关于matlab Otsu阈值分割中的阈值问题!!!

继续求助。。。。。。:cry:
daocaoren_508 当前离线   回复时引用此帖
旧 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 当前离线   回复时引用此帖
旧 2009-02-04, 11:03   #5
tolabfans
普通会员
 
注册日期: 2008-02-29
年龄: 44
帖子: 92
声望力: 19
tolabfans 正向着好的方向发展
默认 回复: [求助]关于matlab Otsu阈值分割中的阈值问题!!!

matlab自动归一化了吧。乘个256就行了
__________________
百足氏冲锋衣万元大奖
tolabfans 当前离线   回复时引用此帖
回复


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码


相似的主题
主题 主题作者 版面 回复 最后发表
[求助]关于三维画图的问题 duckliton MATLAB论坛 6 2008-12-15 18:55
Studying the World's Most Complex Dynamic Systems TechnicalArticles MATLAB技术文章 0 2008-08-29 00:40
求助~!matlab 初级问题~~急要~~谢谢啦 embyg MATLAB论坛 0 2008-07-08 15:35
仪表信息图像采集处理研究 liuna2008 MATLAB论坛 0 2008-04-12 18:53
Simplify Instrument Communication: Using Instrument Drivers with the Instrument Contr TechnicalArticles MATLAB技术文章 0 2008-01-06 16:32


所有时间均为北京时间。现在的时间是 21:37


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.