Expanding object: how do I calculate the speed of expansion from the movement of the edges?
Show older comments
Hello everyone,
I have a 320x320X360 cell in which a video of a (more or less) rectangular object is saved. The size of the object increses over the 360 frames and I would like to claculate the speed of expansion of the object and its change over time.
To do that, I would like to track the position of the edges at a certain row and column.
The images in the cell are binarized and I used the Canny method to extract the edges. Also, I know how big a pixel is (80x80 µm)
Until now I only have
for k = 1:framenumber
vertical(:,k) = bin_edge{1,k}(:,160);
horizontal (:,k) = bin_edge{1,k) (160,:);
end
which returns two matrices with zeros and ones, the ones indicating the found edges.
But how do I now calculate the speed from that? How can I measure the "distances", or the number of zeros between the ones (for they represent the edges)?
And what makes it even harder (at least for me, as a beginner) is that in some columns I have more than 2 ones. Sometimes, "edge" finds more edges within the objects, which I would like to exclude for the calculations.
I realy hope you can help me, since I tried for quite some time now and don't have any ideas anymore.
Many thanks from Germany Julian
Accepted Answer
More Answers (1)
3 Comments
Image Analyst
on 6 Mar 2013
I don't believe this is an "Answer" to your question, so it should have been a comment to my Answer or an edit to your original post.
Julian
on 6 Mar 2013
Image Analyst
on 6 Mar 2013
Did you notice the comment I posted above, under my answer, that had some code in it?
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!