How to trace low-contrast moving object

Hi all,

I hope you can all help me with this one. I need to mask (paint white) moving cells in videos similar to this one:

As you can see, there’s not much contrast between the cell and the background. I have done this for a while using a combination of blurring and thresholding, but some videos (like this example) are prooving very very difficult. I’m currently experimenting with the Trainable Weka Segmentation, but the first run is taking hours to train, and I’m not sure it is ideal for the purpose. I only ever have a single cell in the videos, and I would be totally fine with having to identify the cell outline in the first (or a few) frames manually, and then have the software trace the cell.

Does anyone have suggestions? Help is much appreciated!

Welcome to the forum, @ltnielsen!

I would start by subtracting subsequent frames using the Image Calculator (possibly after some Gaussian filtering). You can for example duplicate the stack, remove one slice at the start or at the end of the two resulting stacks respectively, and then subtract them. This will give you a starting point for following the movement of your object.

Hi @imagejan

Thank you for your suggestion. It does actually give some decent results - especially if I remove more frames than one. At the moment 5 frames is working nicely. There’s still a lot of work afterwards with consequtive threshold/blur cycles to get the whole thing covered. But it’s working better than what I had before. So thanks!

Dear @ltnielsen,

A simple question:
do you need only to track the cell or do you need also the boundaries of the cell?

have a nice day,

Thanks for your interest. Well, I do not need to track the cell per se. I need to paint all of it it white (mask it). While I could do it manually frame by frame with the pencil or paintbrush tool, the video is 300 slices ‘long’ and I have many (50+) such videos. So I need something semi-automated. Here’s an image of what I need to do (the first slice). Everything within the red line needs to be white (and the line shouldn’t be there).

EDIT: Changed image to jpg rather than tif.