Parameter questions

45 views
Skip to first unread message

Adam

unread,
Aug 31, 2015, 10:36:47 AM8/31/15
to MicrobeTracker_Jacobs-Wagner Lab
I have two remaining issues. First, is 'areaMin' just a suggestion? I have set it to 60 but consistently get cell outlines that are much smaller than this (~40). Second, I get a number of "ghost cells" that do not seem to be associated with anything in the phase image. I would like to know which parameter is responsible for them. I have attached an annotated screen shot.

Thank you,
Adam
parameter_example.png

Seán Murray

unread,
Aug 31, 2015, 11:18:50 AM8/31/15
to MicrobeTracker_Jacobs-Wagner Lab

Hi Adam,

this is because of a bug in microbetracker. There is no quality control after cell splitting. So in timelapses or in independent mode with split1=1, cell splitting can result in cells with an area smaller than areaMin. In timelapses, they would get quality checked and deleted on the next frame (still leaving one frame with a bad cell and of course an incorrect mother cell).
Ghost cells are caused by a failure of the alignment routine (the contours gets 'evolved' away from the cell). It can be caused by the bug above -  a bad split is performed, the alignment goes crazy but the cell is kept due to the lack of quality control.


I have made the following change (between the comment lines) at around line 4371 and also at 4706
            mesh1 = model2mesh(cCell1,p.meshStep,p.meshTolerance,p.meshWidth);
            mesh2 = model2mesh(cCell2,p.meshStep,p.meshTolerance,p.meshWidth);
            
            
            %added by sean murray - prevent split if resultant cells are
            %too small  (mother is not reprocessed below, only daughter)
            if length(mesh1)>1
                cellarea1 = polyarea([mesh1(:,1);flipud(mesh1(:,3))],[mesh1(:,2);flipud(mesh1(:,4))]);
            else cellarea1=0;
            end
            if length(mesh2)>1
                   cellarea2 = polyarea([mesh2(:,1);flipud(mesh2(:,3))],[mesh2(:,2);flipud(mesh2(:,4))]);
            else cellarea2=0;
            end

          
            if(fitquality1>p.fitqualitymax || fitquality2>p.fitqualitymax || p.areaMin>cellarea1 || p.areaMin>cellarea2 || p.areaMax<cellarea1 || p.areaMax<cellarea2)
                gdisp(['Tried to split cell ' num2str(cell) ' but failed']);
                if(fitquality1>p.fitqualitymax || fitquality2>p.fitqualitymax) gdisp(['Fit qualities ' num2str(fitquality1) ' ' num2str(fitquality2) ' of daughter cells are too low']);end
                if( p.areaMin>cellarea1 || p.areaMin>cellarea2) gdisp(['Areas ' num2str(cellarea1) ' ' num2str(cellarea2) ' of daughter cells are too low']);end
                if( p.areaMax<cellarea1 || p.areaMax<cellarea2) gdisp(['Areas ' num2str(cellarea1) ' ' num2str(cellarea2) ' of daughter cells are too high']);end
            else
                % end of addition apart from 'end'
                cellStruct1.algorithm = p.algorithm;
                cellStruct2.algorithm = p.algorithm;
                cellStruct1.birthframe = frame;
                cellStruct2.birthframe = prevStruct.birthframe;
                if size(pcCell1,2)==1, model=pcCell1'; else model=pcCell1; end
the extra 'end' comes after the following 'continue'.

I hope that is clear. I do not have access to the Yale git repo that you posted to. It seems to be internal.

Sean

Adam

unread,
Aug 31, 2015, 1:23:06 PM8/31/15
to MicrobeTracker_Jacobs-Wagner Lab
Hi Sean,


I do not have access to the Yale git repo that you posted to. It seems to be internal.

Sorry about that. I thought 'public' repositories on Yale's git server were public, but they are not.

I have moved the repository to my public account: https://github.com/nodice73/MicrobeTracker

One problem I'm having is that 'fitquality1' and 'fitquality2' are not defined anywhere else. What am I missing?

Thanks,
Adam

Adam

unread,
Aug 31, 2015, 2:40:06 PM8/31/15
to MicrobeTracker_Jacobs-Wagner Lab
Hi Sean,

I think I figured it out. Had to get fitqualities from the respective align functions. Changes are in last two commits: https://github.com/nodice73/MicrobeTracker/commits/master/microbeTracker.m

Seán Murray

unread,
Aug 31, 2015, 3:15:11 PM8/31/15
to MicrobeTracker_Jacobs-Wagner Lab
oops, sorry about that!

Adam

unread,
Aug 31, 2015, 3:46:09 PM8/31/15
to MicrobeTracker_Jacobs-Wagner Lab
The ghost cell remained after this fix. I got rid of it by increasing the fitquality parameter to 0.3.
Reply all
Reply to author
Forward
0 new messages