【发布时间】:2016-11-06 08:37:59
【问题描述】:
我不明白为什么在“原始”双图像上使用multithresh 获得的分割与在同一图像上使用相同参数通过mat2gray 缩放的分割不同。
例如:
testimage = randi(100,[200 200]);
figure;imagesc(testimage)
threshs = multithresh(testimage,5);
l0 = imquantize(testimage,threshs);
threshs = multithresh(mat2gray(testimage),5);
l1 = imquantize(mat2gray(testimage),threshs);
在这里,在我的情况下,l1 与 l0 不同,为 808 像素。为什么? testimage 和 mat2gray(testimage) 中像素之间的相对差异应该是相等的,只是绝对差异发生了变化。这对 multithresh 有多重要?
【问题讨论】:
-
我的猜测是范围为
0-max(img)>1的图像被视为0-255图像,并且在multitresh 中有影响 -
@AnderBiguri:这到底是什么意思?值 > 255 会发生什么?当 testimage 是双倍时,这种行为也会出现,顺便说一句。另请注意,在我看来,当 testimage 为 float 类型时,它被缩放为 [0 1](参见 multithresh 的第 224 行)
标签: matlab image-processing cluster-analysis image-segmentation