Particle analyser - huge ellipsoids fitted to (small) holes

Hello - I’m having some trouble with ellipsoid fitting in particle analyser; (Plugins > Analyze > Particle Analyser)

Am I in the right place for help or should i be over at 3D object counter? If i am in the right place … read on:

In a volume which contains many thousands of particles I have a few tens of particles (which are ~20-30 voxels) that end up being fitted with an ellipsoid which has a major axis many hundreds or even thousands of pixels in length.

e.g. the most offensive particle is 11 voxels in area but, the ellipsoid major axis is > 27k pixels
- if i crop this particle out such that it is the only particle I am trying to fit, with 20 pixels space from the edge in all directions and run it again, it will not fit an ellipse / all radii = nan

I am looking to fit an ellipse to each particle and output azimuthal angle and centroid location for each void. So far successful for >90% of features, except for a troublesome few. They are fairly easy to spot and delete from the data, but I don’t think post-processing is the correct way to deal with these anomalies, and I plan to use this protocol for hundreds of datasets

Has anyone ran into this issue before?

thank you all


The ellipsoid fitting code uses as input data the vertices from a surface mesh laid over each particle’s pixels. If particles are small and the mesh is coarse, the input data can be pretty rough and not represent your particle’s geometry faithfully. That’s exacerbated when the particles are not particularly ellipsoidal in shape.

One way to deal with it is to reduce the amount of surface resampling - you will get more surface points per particle that ought to more closely represent their shapes. Another is to not use ellipsoids and rather use the eigenvalues and eigenvectors from the moment of inertia calculation, which might be a bit less sensitive to fitting errors and give comparable results.

Bear in mind that 20-30 pixels is only 3×3×3, which is pretty hard to represent as an ellipsoid function - you are bound to get weird fitting to this kind of data.


thanks very much @mdoube

turning the re-sampling down to 1 seems to have done the trick nicely (acceptably). I will play with the eigen problem soon as well

To expand on this a bit; the inertia tensor satisfies the form of an ellipsoid, so you can work out the “principal ellipsoid of inertia” by taking the inverse square root of each eigenvalue to get the ellipsoid’s radii, which are aligned to the tensor’s eigenvectors.