MATLAB: How to track the object using centroid

Computer Vision Toolboximage processing

I need to track the object in a video using centroid. By calculating the centroid of the object in different frames, I'll be able to track the object and get the count. I'm new to matlab and guide me in completeing the task

Best Answer

regionprops() with the Centroid option.
You may need to convert the image to grayscale or binary first.
Related Question