Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SharpWave committed May 1, 2015
1 parent 2f27bf2 commit 30f3a7e
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions AutoMergeClu.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@
figure;
dists = [];
maxovers = [];
minovers = [];
for j = 1:length(ValidClu)
j

for k = 1:j-1
if (CluDist(ValidClu(j),ValidClu(k)) < 10)
dists = [dists,CluDist(ValidClu(j),ValidClu(k))];
dn = min([length(PixelList{ValidClu(j)}),length(PixelList{ValidClu(k)})]);
maxovers = [maxovers,length(intersect(PixelList{ValidClu(j)},PixelList{ValidClu(k)}))/dn];
dmin = min([length(PixelList{ValidClu(j)}),length(PixelList{ValidClu(k)})]);
dmax = max([length(PixelList{ValidClu(j)}),length(PixelList{ValidClu(k)})]);
maxovers = [maxovers,length(intersect(PixelList{ValidClu(j)},PixelList{ValidClu(k)}))/dmax];
minovers = [minovers,length(intersect(PixelList{ValidClu(j)},PixelList{ValidClu(k)}))/dmin];
end
end
end
hist3([maxovers',dists'],[40 40]);
set(get(gca,'child'),'FaceColor','interp','CDataMode','auto');
keyboard;

end

% for each unique cluster index, find sufficiently close clusters and merge
Expand Down Expand Up @@ -57,7 +60,14 @@
targrat = comm/length(targpix),
currrat = comm/length(currpix),

if ((targrat < 0.5) && (currrat < 0.5))
lowrat = min([targrat,currrat]);
highrat = max([targrat,currrat]);
if (highrat < 0.33333)
display('low OVERLAP, aborting merge');
continue;
end

if ((targrat < 0.6) && (currrat < 0.6))
display('LOW MUTUAL OVERLAP, aborting merge');
continue;
end
Expand Down

0 comments on commit 30f3a7e

Please sign in to comment.