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

if there's fluor on this frame, look there for possible segmentations

parent bee98609
No related branches found
No related tags found
No related merge requests found
% We've already segmented the fluor images, so all we need to do here is
% find the convex hulls in the image that's passed in.
function [objs features] = FluorHulls(im, t)
objs = [];
features = [];
[L num] = bwlabel(im);
for n=1:num
[r c] = find(L==n);
pix = find(L == n);
ch = convhull(c, r);
no = [];
no.t = t;
no.points = [c(ch), r(ch)];
no.ID = -1;
no.indPixels = pix;
no.indTailPixels = [];
no.BrightInterior=1;
no.Eccentricity=0;
no.imPixels=im(pix);
nf = [];
nf.darkRatio = 0;
nf.haloRatio = 0;
nf.igRatio = 0;
nf.darkIntRatio = 0;
nf.brightInterior = 1;
nf.polyPix = [];
nf.perimPix = [];
nf.igPix = [];
nf.haloPix = [];
objs=[objs no];
features = [features nf];
end
end
......@@ -26,7 +26,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha, time)
global CONSTANTS
global CONSTANTS HaveFluor FluorData
if ( length(subSize) < 2 )
subSize = [subSize(1) subSize(1)];
......@@ -56,6 +56,16 @@ function [hulls features] = PartialImageSegment(img, centerPt, subSize, alpha, t
objFeat = [objFeat hemObjFeat];
end
if Helper.HaveFluor() && HaveFluor(time)
greenInd = FluorData(time).greenInd;
flImg = zeros(size(img));
flImg(greenInd) = 1;
subImg = flImg(coordMin(2):coordMax(2), coordMin(1):coordMax(1));
[flObjs, flObjFeat] = Segmentation.FluorHulls(subImg, 1);
objs = [objs flObjs];
objFeat = [objFeat flObjFeat];
end
[hulls features] = fixupFromSubimage(coordMin, img, subImg, objs, objFeat);
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment