Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 29 lines (26 sloc) 777 Bytes
function [cost_selected, edge_selected] = constructGraph(detections,edges,cost_edges,temporal_thr )
% construct the graph according to the temporal distance
num_frame = length(detections);
edge_selected = [];
cost_selected = [];
count = 1;
for i = 1:num_frame
fprintf('cost2pair for frame: %d \n',i);
list = i+temporal_thr;
valid = list <= num_frame;
list = list(valid);
for k = 1: length(list)
j = list(k);
% cost
cost = cost_edges{i,j};
cur_edges = edges{i,j};
if ~isempty(cost)
edge_selected{count} = cur_edges;
cost_selected{count} = cost;
count = count+1;
end
end
end
edge_selected = uint64(cat(1,edge_selected{:}));
cost_selected = cat(1,cost_selected{:});
end