Discussion:
finding centroid of an 3d object
(too old to reply)
Bang Nhan
2010-05-14 00:09:04 UTC
Permalink
Hi I am trying to find the centroid of an arbitrary 3d shape object on MATLAB. THe 3D object is generated by slices of 2D images. By as we move across each 2D slice, the shape of the object change.

Not sure how may I do it on MATLAB. Can anyone give me some hints? The 3D object is double image.

Thanks
ImageAnalyst
2010-05-14 00:26:36 UTC
Permalink
Bang!
If it were a binary image, you'd just average all the x coordinates, y
coordinates, and z coordinates separately. If you need to take into
account the value of the voxel at the (x,y,z) position, you need to
use the usual formulas that do that (in pseudocode)

x_centroid = sum( x * voxelValue) / sum(all the voxel values)
y_centroid = sum( y * voxelValue) / sum(all the voxel values)
z_centroid = sum( z * voxelValue) / sum(all the voxel values)

Do the sums over all voxels in the image.
-ImageAnalyst

Loading...