Skip to content
Snippets Groups Projects
Commit baacd1a7 authored by ac_22's avatar ac_22
Browse files

frameSegment_create create boundaries if needed

parent 075534ea
Branches
No related tags found
No related merge requests found
......@@ -7,10 +7,17 @@ function newCell=frameSegment_create(idxPixels, imSize, channel, time, ...
return;
end
if ~exist('bounds','var')
bw=logical(zeros(imSize));
bw(idxPixels)=1;
bounds=bwboundaries(bw);
end
newCell=[];
newCell.surface=[bounds{1}(:,2),bounds{1}(:,1)];
[r,c]=ind2sub(imSize,idxPixels);
newCell.time=time;
newCell.centroid=[mean([c,r]) 0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment