translate_cog

translation of centre of gravity of a 2d image to the origin.

You are now following this Submission

pts is the matrix representing the 2-D shape or an image. It translates the shape's center of gravity to its origin.
%trans_mat represents the translated matrix of the input matrix pts.

eg:
i=imread('circle.gif');
[x,y]=find(i);
translate_cog([x,y]);

Cite As

anukriti dureha (2026). translate_cog (https://www.mathworks.com/matlabcentral/fileexchange/41927-translate_cog), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0