source: hep2cells/combinecells.m @ 77

Last change on this file since 77 was 45, checked in by dtax, 12 years ago

All useful files for processing of cells.

File size: 407 bytes
Line 
1function [labout,truelab] = combinecells(a,w)
2
3imlab = getident(a,'image');
4ll = unique(imlab);
5n = length(ll);
6lab = zeros(n,1);
7truelab = [];
8for i=1:n
9   I = find(imlab==ll(i));
10   out = a(I,:)*w;
11   %o2 = mean(out);
12   %o2 = median(out);
13   o2 = prod(out);
14   [tmp,lab(i)] = max(o2);
15
16   truelab(i,:) = getlab(a(I(1),:));
17end
18
19classll = getlabels(w);
20
21labout = classll(lab,:);
22truelab = char(truelab);
23
Note: See TracBrowser for help on using the repository browser.