Image-Tracking of Rod-like Bodies

A method for calculating curvature of a plane curve connecting points on the surface of a rod-like body undergoing large deformations

You are now following this Submission

Given an image of a curve on a body that is optically distinct from its surroundings, image segmentation, pixel skeletonization, and cubic smoothing splines are used to compute a smooth curve that approximates the original curve. Signed curvature is calculated using the approximated centerline.

Here we describe the core m-files that run our tracking scheme. These files were written and implemented in MATLAB 2019a.

trackCurve.m - This script is a MATLAB utility for tracking videos of individual, slender, rod-like bodies undergoing highly nonlinear deformations. Using images of an actuator deforming as input, the program produces a fitted spline over the center-line of the soft actuator and calculates the curvature of the rod as a function of an arc-length.

This is the main script that calls on the other helper functions. This utility requires the dependent functions \code{fitAndPlot.m} and \code{assignArcLength.m}. The user inputs are specified at the beginning of this script. (specify which image to analyze, smoothing parameter, number of k-segments, down sample factor, method for finding arc length, start direction).

fitAndPlot.m - A helper function that generates curvature as a continuous function.

assignArcLength.m - A helper function that travels along a skeletonized path, assigning a unique identifier to each point, creating a curve in X and Y coordinates parameterized by a "pseudo" arc-length

splitVideo.m - A function that a video into a series of images and saves those images to file. The function will create a new folder for the new images in the same directory as the source video.

getPixelsPerLength.m - A function that finds the pixels per length of a given reference image, and is designed as a tool for finding the scaling factor needed to calibrate the curvature calculations performed in trackCurve.m.

Cite As

Elaine Kwan (2026). Image-Tracking of Rod-like Bodies (https://www.mathworks.com/matlabcentral/fileexchange/73607-image-tracking-of-rod-like-bodies), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Modify Image Colors in Help Center and MATLAB Answers

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0