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