Commit b61d61b5 authored by ac 20's avatar ac 20
Browse files

importExport setMissingTrackID for occluded segmentation

parent 62705ece
......@@ -244,5 +244,19 @@ idx=find(tctc>=tids(:,3) & tctc<=tids(:,4));
idsNeeded=tids(idx,2);
labelsMissing=setdiff(idsNeeded,idsIm);
if ~isempty(labelsMissing)
fprintf(2,'missing track label found!\n');
fprintf(2,'occluded segmentation. label=%s time=%d (not a huge deal)\n',mat2str(labelsMissing),t);
for i=1:length(labelsMissing)
idx=find(tids(:,2)==labelsMissing(i));
cmd=['select centroid from tblCells where trackID=' num2str(tids(idx,1)) ...
' and time=' num2str(t)];
q=fetch(conn,cmd);
if ~isempty(q)
cx=round(jsondecode(q.centroid{1}));
if ~is3D(im)
cx=cx(1:2);
end
idxcx=sub2ind(size(im),cx(2),cx(1));
im(idxcx)=labelsMissing(i);
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment