Mercurial > hg > mauch-mirex-2010
annotate _FullBNT/KPMtools/bipartiteMatchingDemoPlot.m @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | b5b38998ef3b |
children |
rev | line source |
---|---|
matthiasm@8 | 1 function bipartiteMatchingDemoPlot(sources, detections, a) |
matthiasm@8 | 2 |
matthiasm@8 | 3 hold on |
matthiasm@8 | 4 p1 = size(sources,2); |
matthiasm@8 | 5 p2 = size(detections,2); |
matthiasm@8 | 6 for i=1:p1 |
matthiasm@8 | 7 h=text(sources(1,i), sources(2,i), sprintf('s%d', i)); |
matthiasm@8 | 8 set(h, 'color', 'r'); |
matthiasm@8 | 9 end |
matthiasm@8 | 10 for i=1:p2 |
matthiasm@8 | 11 h=text(detections(1,i), detections(2,i), sprintf('d%d', i)); |
matthiasm@8 | 12 set(h, 'color', 'b'); |
matthiasm@8 | 13 end |
matthiasm@8 | 14 |
matthiasm@8 | 15 if nargin < 3, return; end |
matthiasm@8 | 16 |
matthiasm@8 | 17 for i=1:p1 |
matthiasm@8 | 18 j = a(i); |
matthiasm@8 | 19 if j==0 % i not matched to anything |
matthiasm@8 | 20 continue |
matthiasm@8 | 21 end |
matthiasm@8 | 22 line([sources(1,i) detections(1,j)], [sources(2,i) detections(2,j)]) |
matthiasm@8 | 23 end |
matthiasm@8 | 24 axis_pct; |