how to apply active contours image segmentation to a video?

3 vues (au cours des 30 derniers jours)
Ben Timm
Ben Timm le 20 Juil 2020
Commenté : Ben Timm le 21 Juil 2020
Hi all,
I have a number of videos with edge detection appropriately applied to a cluster of cells. I am trying to segment them so that after I can measure their change in area over time but am afraid I dont know how to apply the segmentation to a video.
I read on another post that you could apply it to the first frame then use that frame as a hallmark for the others, would that work?
See a single frame attached to understand what I am working with for now, unfortunately the videos are too large to attach.
Thanks,
Ben

Réponse acceptée

Image Analyst
Image Analyst le 20 Juil 2020
I have no idea what you want to do. With an edge detection, you will have lots of curves, most of which will not be closed contours. So what do you want to do with all those curves? Compare their curve lengths over time? If your plant is wiggling, then the curves will be drastically changing. Not only changing, but the label (ID number) of a given curve will change, making it extremely hard to track one particular curve. Imagine you just had 50 random curves on one frame. Now imagine in the next frame you had 62 curves that have completely different coordinates. How do you match up the 50 in one frame to the 62 in the next frame? Tracking is not easy. Even for me it would take several months of work to get something not even 100% robust. You might look into professional, commercial tracking software, or look into optical flow as a metric that hopefully means something relevant.
  3 commentaires
Image Analyst
Image Analyst le 20 Juil 2020
If the period of time is short enough that the centroids of the segmented regions don't move much, then you can match up the regions by comparing the centroids with the centroids in the prior image using pdist2(). Whichever other region in the other frame had the min distance is the same region. But this depends on them not moving much. So the centroid can't move much more than about half way out to the outer border of the region or else you'll have problems matching them up.
And all that depends on getting the regions segmented in the first place. Edge detection may or may not be a good way to segment regions, though usually it's not. Honestly I don't know what's what in your images. Even if I had to try to manually outline the regions, I'd have difficulty in accurately tracking the region. Obviously with edge detection, the contours are not closed so you will not have closed regions. It may be that you either have to
  1. manually trace each region with drawfreehand()
  2. train a deep learning network, like Segnet perhaps, to identify them
Even if you do #2, you'll still have to trace regions with drawfreehand() or the ImageLabeler app in order to train the network, but at least once you've done that for a few hundred images you won't have to do it anymore. See This Link Unless automatic identification of regions is going to be a major part of your project, then it might be faster to just do #1 and be done with it, rather than delve into the Deep Learning stuff which could take you weeks or months to learn and perfect for your images.
Ben Timm
Ben Timm le 21 Juil 2020
Alright I see the problem now, thankfully the cells dont change much in size so the application of pdist2() would likely work. I think #2 would be the best option but as you said it will take a good amount of time to understand and get working so for the long term goal, I will build toward that direction. However, for the time being I need to provide some sort of result. Thankfully because I have extracted the frames of the videos so I can attempt a radial profile on a selected cell from a singular frame (much simpler!).
To make life a little more difficult for myself, would you know of any functions that extract singular frames of a video at specific points (say at 25%, 50% and 78% of the video)? After that I can figure out how to select a specific point within the image and it can create a graph on the size of the cell.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image and Video Ground Truth Labeling dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by