Making the centroid of an image equal to 0

1 view (last 30 days)
Hello:
I calculated the centroid of my input image. I am decomposing the image into zernike moments. As zernike moments lie on the unit circle, the centroid of the image has to be 0. How do I get an image that has a centroid of 0?
Thanks,
Urmila
  1 Comment
None None
None None on 28 Jan 2013
We are also using Zernike moments. But we are not getting the concept of mapping region into unit circle. Is it related to compressing an image or region in image or somethingelse. Pls help us. Thanks, Lalita

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 18 Jan 2013
Find the centroid and subtract that off of all of your coordinates. Just don't try to index an array at the resulting values.
  3 Comments
Walter Roberson
Walter Roberson on 28 Jan 2013
Suppose your array is from 1 to 100, and the centroid shows up at (say) 35. You subtract that 35 from all of your coordinates, so your coordinate system now runs from -34 to 66. You can then do calculations based on that coordinate system. But do not try to index an array at location -34: array locations start at 1, always. Coordinates are not array indexes.
None None
None None on 29 Jan 2013
Thanks. This will be really helpful for us for our project.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!