% Author: Dr. Joshua Morgan and Isabella Bagdasarian, TIME lab, UCR %Perform a stricter segmentation of the nuclear channel %PARAMETERS % Db2 - NxN logical % Do- NxN filtered image % areaopen- smallest size to preserve when performing bwareaopen, % single value function [Db4, L, Df] = StrictNucSeg(Db2, Do, areaopen) Db3 = bwareaopen(Db2,areaopen); CC = bwconncomp(Db3); Sn = regionprops(CC,Do,'MaxIntensity','MeanIntensity','PixelValues','Area'); L = labelmatrix(CC); Db4 = Db3; for si = 1:length(Sn) t1 = 0.05*Sn(si).MaxIntensity; Db4(L & Do