资源简介

采用超像素进行分割图像,利用到了超像素和Ncut的方法,采用了c与maltab混合编程。 Mex program c and matlab)

资源截图

代码片段和文件信息

% M is a segmentation mask entries in {12...K}.
% C is a segmentation mask entries in {12...L}.
%
% Compute a segmentation respecting the boundaries in M clustering points until there
% are no more than p_max pixels in a cluster.
% k-means clustering on (xy) position is run on each cluster from M.
function C = clusterLocations(Mp_max)
C = zeros(size(M));
K = max(M(:));

c_off=0;
for k_i=1:K
  [xxyy] = find(M==k_i);
  l_this = ceil(length(xx)/p_max);
  
  if l_this > 1
    idx = kmeans([xx yy]l_this‘Start‘‘sample‘‘Replicates‘10‘EmptyAction‘‘singleton‘);
  else
    idx = ones(size(xx));
  end
  
  inds = sub2ind(size(M)xxyy);
  C(inds) = idx + c_off;
  
  c_off = c_off + l_this;
end

% Uniquify just in case clusters were lost in k-means.
Cv = C‘;
Cv = Cv(:);
uu = unique(

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        906  2006-03-18 05:19  superpixels\clusterLocations.m

     文件        888  2006-03-18 06:10  superpixels\dist2.m

     文件      25784  2005-04-05 05:04  superpixels\img_000070.jpg

     文件       5139  2006-03-18 07:26  superpixels\imncut_sp.m

     文件       5588  2005-07-05 01:52  superpixels\imncut_sp.m~

     文件        234  2005-04-05 04:59  superpixels\pbThicken.m

     文件       1388  2005-04-05 05:15  superpixels\pbWrapper.m

     文件       1324  2006-03-18 07:28  superpixels\README

     文件       1317  2005-11-05 02:32  superpixels\README~

     文件        193  2005-04-05 05:02  superpixels\segImage.m

     文件       1294  2006-03-18 07:26  superpixels\sp_demo.m

     文件       1111  2006-01-17 06:58  superpixels\sp_demo.m~

     文件       1610  2005-04-05 05:24  superpixels\yu_imncut\cncut.m

     文件       2194  2005-04-05 05:22  superpixels\yu_imncut\computeW.m

     文件       1817  2005-05-10 06:23  superpixels\yu_imncut\csparse.c

     文件       8928  2005-05-10 06:24  superpixels\yu_imncut\csparse.mexmac

     文件        505  2005-04-05 05:20  superpixels\yu_imncut\doog1.m

     文件        664  2005-04-05 05:22  superpixels\yu_imncut\fft_filt_2.m

     文件        697  2005-04-05 05:21  superpixels\yu_imncut\gaussian.m

     文件       1516  2005-04-05 05:26  superpixels\yu_imncut\getbinsol.m

     文件       4512  2005-05-10 06:22  superpixels\yu_imncut\ic.c

     文件       8900  2005-05-10 06:24  superpixels\yu_imncut\ic.mexmac

     文件       4281  2005-05-10 06:23  superpixels\yu_imncut\imnb.c

     文件       8936  2005-05-10 06:24  superpixels\yu_imncut\imnb.mexmac

     文件        864  2005-04-05 05:19  superpixels\yu_imncut\make_filterbank_odd2.m

     文件        114  2005-05-10 06:25  superpixels\yu_imncut\NOTE

     文件       1779  2005-04-05 05:26  superpixels\yu_imncut\parmatV.c

     文件       8820  2005-04-05 05:26  superpixels\yu_imncut\parmatV.mexmac

     文件       3170  2005-04-05 05:25  superpixels\yu_imncut\spmd.c

     文件       8964  2005-04-05 05:25  superpixels\yu_imncut\spmd.mexmac

............此处省略5个文件信息

评论

共有 条评论