Hi:
what is the function to calculate center of mass or
centroid of a 2d object.
Thank
NBT
1. Center of mass / Center of gravity - MATLAB
2. center of mass of objects in a 3D box
Hello, I have created a 3D box with particles in it. These particles have odd shapes and I want to find the center of mass of each particle and then connect these centers. Could someone guide me how to do this? Many thanks in advance.
3. How to compute center of mass for an image - MATLAB
4. Calculating the Center of Mass of a 3D Binary Array/Matrix
Hi, I'm an undergraduate doing some some physics research. I apologize if this is the wrong group, but this is the only thing that popped up on google groups. Here is my task: 1) Import 10 images into matlab in binary format and superimpose them on top of each other 2) Put it back into Binary Format (because superimposing 10 images will yield overlaps and those overlaps values will now contain values that are greater than 1. 3) Find the 3D center of mass of the volumetric matrix The object I have is a tumor in 3 Dimensions - The tumor is bounded within a matrix that is 512,512,117. The tumor does not compromise the whole of the matrix, just a small portion. I thought the math behind finding the Center of Mass (CM) would be simple but after getting the equations down and pondering over it I realized that it wouldn't work. I've finished with steps 1 and 2 (quite easy). I wanted to do the following (not using the sum matlab function = sum() represents equals large-sigma with bounds) A = sum(mx)/M B = sum(my)/M C = sum(mz)/M where m = mass (or the value at the specified coordinate) where x = the x (or first) dimension where y = the y (or second) dimension where z = the z (or third) dimension where M = total mass over three dimensions (easy to do using a triple sum function in matlab) where (A,B,C) = will equal the new coordinates (in decimal format), but multiplying them by a multiplicative factor shoudl fix that ( a total guess) Major problems: I am keeping the two coordinates that I'm not summing over at a constant number (i.e. zero) If I do this, then all I am adding up/summing over are the outer edges of the matrix which don't contain the tumor (I know this for a fact). After researching on the internet, I have come to the conclusion that I am dealing with a centroid, something which I have never seen in my life. I'd appreciate any and all help, thank you.
5. Calculating the center of mass per line - MATLAB
Hi all, I need some help in finding out a way to calculate the center of mass of a waveform. I have seen a lot of posts about finding it for a triangle and a polygon, but I am not sure if I can apply that to a waveform. The waveform has 40 data points and you could assume it looks like the positive half of a standard sine wave. any help would be appreciated. Rahul Shingrani
8. faster way to calculate "center of mass" than using regionprops
hi guys, does anyone know if there is a faster way to calculate the center of mass of an image than using the Centroid property of the command regionprops. the image is an 240x320 rgb image. stats = regionprops(image, 'Centroid'); lasts at my computer system at least 0.5 sec. i need to be faster than 0.1 sec to calculate the center of mass. please help me. thanks. k.