Skip to content
Snippets Groups Projects
Commit a2999870 authored by Walt Mankowski's avatar Walt Mankowski
Browse files

Only look for submarines when alpha == 1

This is because the submarine detection code runs Michel, which can take a
while.  Upstream code can call this function multiple times with different
alphas, but we only want to call the slow Michel code once.

A better solution would probably be to refactor things to make the calling code
smarter, but at least this makes things better for the time being.
parent 4bca88d1
Branches
Tags
No related merge requests found
...@@ -50,6 +50,7 @@ function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha, t ...@@ -50,6 +50,7 @@ function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha, t
[objs objFeat] = Segmentation.FrameSegmentor(subImg, 1, alpha); [objs objFeat] = Segmentation.FrameSegmentor(subImg, 1, alpha);
if alpha == 1 % hack to keep from running this slow code multiple times
if strcmp(CONSTANTS.cellType, 'Hemato') if strcmp(CONSTANTS.cellType, 'Hemato')
[hemObjs, hemObjFeat] = Segmentation.HematoSubmarineFrameSegmentor(subImg, 1); [hemObjs, hemObjFeat] = Segmentation.HematoSubmarineFrameSegmentor(subImg, 1);
objs = [objs hemObjs]; objs = [objs hemObjs];
...@@ -65,6 +66,7 @@ function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha, t ...@@ -65,6 +66,7 @@ function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha, t
objs = [objs flObjs]; objs = [objs flObjs];
objFeat = [objFeat flObjFeat]; objFeat = [objFeat flObjFeat];
end end
end
[hulls features] = fixupFromSubimage(coordMin, img, subImg, objs, objFeat); [hulls features] = fixupFromSubimage(coordMin, img, subImg, objs, objFeat);
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment