hi,i am new to matlab..i want to detect a object in image.and i have to find centroid for the detected object....can anyone help me in this...i have detected the object by extracting its edges

i have detected the edge of the object,but how to find the centriod for the detected object...

Answers (1)

You'd have to connect the edges all the way around the perimeter - perhaps use imclose(). Then call imfill() to make the object solid. Then call bwlabel and regionprops. See my Image Segmentation Tutorial for example code: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

This question is closed.

Asked:

on 27 Sep 2012

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!