Video Object tracking with unstable background

4 views (last 30 days)
Hello, I'm trying to track an octopus in its tank. (see attached sample video). The disturbances in the water surfaces and the changes in the animal body shape and color - makes it hard for matlab to track it automatically. Any code or a reference will be appreciated. Thank you Noam

Answers (1)

prabhat kumar sharma
prabhat kumar sharma on 19 Jan 2024
Hi Noam,
Object tracking is itslef an challenging task becuase it consist of object detection and localization both.
Tracking an octopus in a tank can be difficult because of the water disturbances, body form changes, and color differences. Even with these difficulties, there are a number of tools and methods in MATLAB that can aid in object tracking. The following procedures and sources can be utilized in the development of your tracking algorithm:
Background Subtraction: This technique can assist in separating the octopus in motion from the stationary background. The vision of MATLAB.ForegroundDetector is a useful tool for this.
You can refer this documentation on foreground detection : https://mathworks.com/help/vision/ref/vision.foregrounddetector-system-object.html
Color-based Segmentation: If the octopus would be of a distinct color, you could use color thresholding to segment it from the rest of the image. MATLAB's "rgb2hsv" function can be used to convert RGB images to HSV, which is often more effective for color segmentation.
Particle Filter (PF): This probabilistic method represents the octopus's state (position, velocity) as a set of particles. Each particle is updated based on the video frame and a motion model, making it robust to occlusions and deformations. Here's a MATLAB tutorial on PF: https://www.mathworks.com/help/robotics/ug/particle-filter-parameters.html
Mean-Shift Tracking: This non-parametric technique uses color histograms to track objects. It's efficient for tracking objects with consistent color features like the octopus's mantle. Here's an example implementation: https://www.mathworks.com/matlabcentral/fileexchange/10161-mean-shift-clustering
Kalman Filter: This statistically optimal filter predicts the octopus's future state based on past observations and a motion model. It's suitable for scenarios with predictable movements but might struggle with abrupt changes. Here's a tutorial on Kalman filters: https://www.mathworks.com/help/control/ug/kalman-filtering.html
Here are few more additional resource you could utilize.
Based on your problem you can try the combination of different approaches, as for the sample video you have shared color based segmentation might not be useful because the frames would not contain the color seperable objects.
I hope it helps!

Categories

Find more on Image Processing and Computer Vision 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!