Measuring displacement and velocity of an extending/contracting object

2 visualizaciones (últimos 30 días)
Hi,
I'm a novice MATLAB user, very inexperienced in motion tracking and video processing, but I have a task that appears somewhat simple on its surface, and I want a robust solution for it:
I have video of what is essentially an accordion which repeatedly expands and contracts. The "accordion" is not exactly a regular shape, but I'd like some quantified measure of its
  • peak linear displacement at the maximum extension and contraction points of each actuation cycle
  • a continuous graph of its linear displacement over time
  • a continuous graph of its velocity over time
Is there a straightforward way to do this within MATLAB? The video was recorded in front of a grid pattern for scale. I've attached a gif of the motion for illustration:
accordion_example.gif

Respuestas (1)

Image Analyst
Image Analyst el 9 de Mayo de 2020
Yes, it's fairly simple. Just read in a frame, and subtract the first frame. Look for significant changes by thresholding. Call bwareafilt() to get the largest blob, then call regionprops() to get the area and bounding box. I'm attaching a little demo that gives a start on it. Just change it so that the background is frame 1, not a weighted average of the past few frames.
Compute the number of square cm per pixel by looking at your grid, then multiply the bounding box and area by that calibration factor. Attach your movie if you need more help.

Community Treasure Hunt

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

Start Hunting!

Translated by