No BSD License
Fahd Ahmad Abbasi
Fahd Ahmad Abbasi (view profile)
11 Jul 2004
13 Jul 2004)
Calculates centroid of an object present in an image.
Watch this File
Function takes a picture as an argument (suitably should contain only one object whose centroid is to be obtained) and returns the x and y coordinates of its centroid.
the following code is easier and faster:
Besides, you may use "meshgrid" command instead of defining x variable in your code (i.e. x=meshgrid(1:columns,1:rows);)
Calculates the centroid of the entire image.
This is a first order centroiding algorithm but is not suitable for determining the centroids of objects when a background in present.
thanks fahad this is the first step of my project implementation
Thanks a lot for this code. It will be very useful for me =)
thank you for this code but if there is shadow of object in pic. can this code measure the real C.G of the object
it helped me im my Computer Vision Assignment
Simple to implement. With instructions
quick and useful. Save yourself a few minutes of coding.