Last change
on this file since 100 was
45,
checked in by dtax, 12 years ago
|
All useful files for processing of cells.
|
File size:
407 bytes
|
Line | |
---|
1 | function [labout,truelab] = combinecells(a,w) |
---|
2 | |
---|
3 | imlab = getident(a,'image'); |
---|
4 | ll = unique(imlab); |
---|
5 | n = length(ll); |
---|
6 | lab = zeros(n,1); |
---|
7 | truelab = []; |
---|
8 | for 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),:)); |
---|
17 | end |
---|
18 | |
---|
19 | classll = getlabels(w); |
---|
20 | |
---|
21 | labout = classll(lab,:); |
---|
22 | truelab = char(truelab); |
---|
23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.