Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Centroid of an image file
Replies: 1   Last Post: May 29, 2013 9:10 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
ImageAnalyst

Posts: 12,932
Registered: 12/26/06
Re: Centroid of an image file
Posted: May 29, 2013 9:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Sunayana C" wrote in message <ko2tgv$o75$1@newscl01ah.mathworks.com>...
> Hello every one...
>
> I need to find the centroid of an image file...However I don't have the image tool box and hence converted my images in .bmp format to .mat format using octave....Now I need to find the centroid of this .mat file how should I do it ??

====================================================
See my image segmentation tutorial. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862

Basically you can set up a binary image the same size as your image and then call regionprops:

binaryImage = true(size(grayImage));
measurements = regionprops(binaryImage, grayImage, 'WeightedCentroid');
centroids = [measurements.WeightedCentroid];



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.