The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

Posts: 13,022
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$>...
> 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.

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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.