Daniel@0: function bipartiteMatchingDemoPlot(sources, detections, a) Daniel@0: Daniel@0: hold on Daniel@0: p1 = size(sources,2); Daniel@0: p2 = size(detections,2); Daniel@0: for i=1:p1 Daniel@0: h=text(sources(1,i), sources(2,i), sprintf('s%d', i)); Daniel@0: set(h, 'color', 'r'); Daniel@0: end Daniel@0: for i=1:p2 Daniel@0: h=text(detections(1,i), detections(2,i), sprintf('d%d', i)); Daniel@0: set(h, 'color', 'b'); Daniel@0: end Daniel@0: Daniel@0: if nargin < 3, return; end Daniel@0: Daniel@0: for i=1:p1 Daniel@0: j = a(i); Daniel@0: if j==0 % i not matched to anything Daniel@0: continue Daniel@0: end Daniel@0: line([sources(1,i) detections(1,j)], [sources(2,i) detections(2,j)]) Daniel@0: end Daniel@0: axis_pct;