Skip to content
Snippets Groups Projects
Commit 31c0bcb0 authored by Mark Winter's avatar Mark Winter
Browse files

Aggressive add-segmentation and some minor frame-seg fixes.

parent 54db9165
Branches
Tags
No related merge requests found
......@@ -32,6 +32,16 @@ function newTrackID = AddNewSegmentHull(clickPt, time)
[newObj newFeat] = Segmentation.PartialImageSegment(img, clickPt, 200, 1.0);
% Aggressive add segmentation
if ( isempty(newObj) )
for tryAlpha = 1.25:(-0.05):0.5
[newObj newFeat] = Segmentation.PartialImageSegment(img, clickPt, 200, tryAlpha);
if ( ~isempty(newObj) )
break;
end
end
end
newHull = struct('time', [], 'points', [], 'centerOfMass', [], 'indexPixels', [], 'imagePixels', [], 'deleted', 0, 'userEdited', 1);
newFeature = struct('darkRatio',{0}, 'haloRatio',{0}, 'igRatio',{0}, 'darkIntRatio',{0}, 'brightInterior',{1}, 'polyPix',{[]}, 'perimPix',{[]}, 'igPix',{[]}, 'haloPix',{[]});
......
......@@ -5,6 +5,10 @@ function [objs features levels] = FrameSegmentor(im, t, imageAlpha)
levels.haloLevel = graythresh(im);
level=imageAlpha*levels.haloLevel;
level = min(level,0.95);
level = max(level,0.05);
bwHalo=im2bw(im,level);
bwDark=0*im;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment