基于区域的细分有多少种功能

时间:2015-03-04 17:45:58

标签: image image-processing image-segmentation feature-extraction

我必须使用基于区域来分类前景(FG)和背景(BG)。我读了很多关于这个问题的论文。但是,几乎我读过的论文,他们经常使用均值特征来比较均方误差,如

(I(x)-mean(FG)).^2>(I(x)-mean(BG)).^2=>x belong to BG 

一些作者添加了一些使用统计reigon的条件(添加sigma术语)。如何描述图像区域的其他功能。你能告诉我一些功能吗?非常感谢你

1 个答案:

答案 0 :(得分:0)

尝试我在Matlab中创建的名为' Quantisation'的功能,注意这是用于灰度图像。它会自动在图像中找到阈值,并将所有类别中的所有像素分类为FG或BG:

function [quant2_A_min,quant2_A_max] = Quantization(fname)

% If there is less that one input argument 'B20.BMP' will be read in.
if nargin <1
    fname='B20.BMP'
end
% define fname as the variable 'X'.
X=fname;
%splits the image into 2 levels by obtaining 2 threshold values.
thresh = multithresh(X,1);
%Contructs a vector of max values so that the max value in each
%quantization interval is assigned to the 2 levels of o/p image
valuesMax = [thresh max(X(:))];
[quant2_A_max, index] = imquantize(X,thresh,valuesMax);
%Contructs a vector of min values so that the min value in each
%quantization interval is assigned to the 2 levels of the o/p image
valuesMin = [min(X(:)) thresh];
%use the output argument index to assign the MIN values to the output image
%instead if called imquantize again.
quant2_A_min = valuesMin(index);
%Display both 2 level images side by side
imshowpair(quant2_A_min,quant2_A_max,'montage');...
    title('Quantised Images (Min & Max)', 'FontSize',14,...
'fontweight','bold');
end