From: Bang Nhan on
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
From: ImageAnalyst on
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
 | 
Pages: 1
Prev: surf colormap problem
Next: Align T zero