0

I have a 3d pixel data and I want to fit ellipsoid to it . Is there a way to fit ellipsoids to 3d image.

So far I have included an ellipsoid to my data and rotated it . I have been trying to fit ellipsoid by manually in python by changing semi-major axis along x,y,z axis of the ellipsoid for each desired rotation.

What I wish to attain is an automatic way in which the ellipsoid rotates and every time it goes to different angle it would fit an ellipsoid to the data .

The images below describe the data in blue and ellipsoid in Red . The ellipsoid in Red has been rotated at different angles in image 1 and 2. The fitting was done in python by changing parameters of ellipsoid manually in the first image .

This is the data in the blue and rotated ellipsoid in Red

Another image rotated at different angle

The fitting has to be such that all the elongated structures in the image should be fitted with the ellipsoid. As we can see in the figure below that there are many elongated structures specially in the lower end of the image which need to be fitted.

Astro
  • 33
  • 1
  • 7
  • Would you please consider providing some sample array to work with? – kmario23 Apr 23 '19 at 14:02
  • What is the criteria to fit the ellipsoid? It's easy to fit an encompassing ellipsoid to the data, but it doesn't look like that is the case. Probably what you want is to first use an unsupervised clustering method to batch parts of your data and then fit the ellipsoids? Even then, you probably need to know how many clusters are in your data. – anishtain4 Apr 23 '19 at 14:19
  • It should fit in a way that each elongated structure in the image is a separate entity. From the center of the image to the bottom there are 3 elongated structure , 2 elongated structures are on the left which are connected. I want to be able to fit each of these separately while the ellipsoid rotates. – Astro Apr 23 '19 at 14:33
  • I have added the code that I have tried so far to rotate and fit the ellipsoid manually by changing a,b,c . – Astro Apr 23 '19 at 14:44
  • Hi @nicoco , I did not see any matlab script in the link you gave . – Astro Apr 23 '19 at 15:20
  • 1
    Oops. Wrong copy/paste: https://github.com/pierre-weiss/FitEllipsoid – nicoco Apr 23 '19 at 15:32

0 Answers0