-2
$\begingroup$

Suppose I have two ellipsoids $A$ and $B$ respectively represented as $(x-C_A)^T M_A(x-C_A)$ and $(x-C_B)^T M_B(x-C_B)$ in the matrix representation.

What's the best way to find a a function that attaches a real number to any pair of ellipsoids as a way of measuring their similarity?

Here's an example: alt text

I've come up with the following but was hoping for a simpler method:

  1. Minimize the volume of intersection (how?)
  2. Convert the ellipse to the canonical form $\frac{(x-C_x)^2}{a}+\frac{(y-C_y)^2}{b}+\frac{(z-C_z)^2}{c} = 1$ by obtaining the SVD of $M$ such that $M = U*S*V^T$ and extracting $a,b,c$ from $S$ and the axis-angle representation of the rotation matrix $V$. Then, I (somehow) use this to compare two ellipsoids.

The example I've provided is a little extreme since the smaller ellipsoid is "very" different from the others. But as you can see, the thin skinny ones overlap over a similar space and are similar in dimensions and orientation - I'm trying to quantify this in some way.

A fairly detailed explanation of a good distance metric would be appreciated!

$\endgroup$
4
  • $\begingroup$ Your question isn't very clear. Which pairs of ellipsoids should have "maximal" "similarity measure"? Ones that are identical, ones that are merely congruent, or is geometrical similarity enough (i. e. congruent up to (isotropic) scale)? $\endgroup$ Commented Nov 19, 2009 at 16:40
  • $\begingroup$ Geometrically similar - I've updated this in the question. $\endgroup$
    – Jacob
    Commented Nov 19, 2009 at 16:51
  • 1
    $\begingroup$ -1, unclear question. What kind of answer are you looking for when you say "degree of similarity"? Do you want a function that attaches a real number to any pair of ellipsoids as a way of measuring how similar they are? $\endgroup$
    – S. Carnahan
    Commented Nov 19, 2009 at 19:03
  • $\begingroup$ Yes, a distance metric, like the Hausdorff distance $\endgroup$
    – Jacob
    Commented Nov 19, 2009 at 19:05

2 Answers 2

1
$\begingroup$

From your vague dismissal of David Lehavi's answer, it seems what you want is a distance between a pair of embeddings of ellipsoids. Or something like a non-negative function on the 12-dimensional space "pairs of embedded ellipsoids mod rigid motions of $\mathbb{R}^3$".

Would the following idea be right for what you want? Given ellipsoids A and B in $\mathbb{R}^3$, first find the translation and rotation of $\mathbb{R}^3$ which moves ellipsoid A so that it's centered at the origin and has its principal axes aligned with the coordinate axes. That is, a rigid motion taking ellipsoid A to another embedding of an ellipsoid A' so that $C_{A'}=0$, $M_{A'}$ is diagonal with eigenvalues ordered by size. What we're doing here is putting ellipsoid A in a standard position.

Next take the transformation that took A to standard position and apply it to ellipsoid B which moves it to some new embedded ellipsoid B'. Ellipsoid B' is now characterized by $C_{B'}$ and $M_{B'}$ (something like $C_{B'} = C_B-C_A$, $M_{B'}= O^T M_B O$, where $O$ is the rotation diagonalizing $M_A$ as described previously)

One can now assign a "distance" between A and B which depends only on the eigenvalues of $M_A$ (3 parameters), the vector $C_{B'}$ (3 parameters) and the matrix $M_{B'}$ (6 parameters, which you could split into 3 eigenvalues+3 parameters of a rotation if you decomposed $M_{B'}$). By moving your ellipsoids together to this "standard position" we've quotiented out the space of "pairs of embedded ellipsoids" by the action of rigid transformations of $\mathbb{R}^3$, as presumably you want your distance function to be invariant under this group.

There are many distances one can assign to ellipsoids in standard position, depending on how you weight "shape" vs. "distance" vs. "orientation", etc. - what you choose is going to depend heavily on what you want. One family of examples is

$distance(A,B)=a_1|\lambda_A - \lambda_{B'}| + a_2|C_{B'}| + a_3 d_{SO(3)}(I,O)$,

where $\lambda_i$ is the (ordered) vector of eigenvalues of ellipsoid $i$, $|\cdot|$ denotes the norm on 3-vectors, $d_{SO(3)}(I,O)$ is the distance between the rotation $O$ and the identity matrix $I$ in the space of rotations $SO(3)$ and $a_1,a_2,a_3$ are weights.

So please do give your needs a little more thought.

$\endgroup$
2
  • $\begingroup$ Thank you jc for this detailed answer exactly along the lines of what I wanted. Again, I apologize for my hand-wavy comments. By distance between O and I, do you mean the Frobenius distance? $\endgroup$
    – Jacob
    Commented Nov 30, 2009 at 15:50
  • $\begingroup$ I was thinking the distance induced by the metric of constant positive curvature on SO(3) (which you can compute by say lifting your rotation matrices to unit quaternions (up to sign) and then finding the "angle" by taking the inverse cosine of the dot product), but as I said, there's a lot of freedom here and perhaps the Frobenius distance might be better suited to your needs. $\endgroup$
    – j.c.
    Commented Nov 30, 2009 at 20:14
1
$\begingroup$

I assume that by similarity you mean some generalization of the Eucilidean similarity concept, where two shapes are similar if you can map one to the other using a composition of a rigid transformation and a scalar matrix.

If this is the case, the triplets of eigen values of the two matrices, should be thought of as points in the projective real plane, mod the S_3 action. I'd use the metric induced from the sphere.

$\endgroup$
4
  • $\begingroup$ No - I'm looking for a similarity measure for the ellipses defined as they are. Therefore, the triplets alone is not good enough, I need to encapsulate the orientation and center point as well. $\endgroup$
    – Jacob
    Commented Nov 19, 2009 at 18:08
  • $\begingroup$ @Jacob: Similarity is an equivalence relation, so you can take the quotient of the space of ellipsoids by this relation, and look for a nice metric; this is what I described above. I don't understand what you mean by "capture". $\endgroup$ Commented Nov 19, 2009 at 21:41
  • $\begingroup$ @Jacob: if the orientation and center make a difference, then you're not talking about geometric similarity. Which brings us back to point one: what are you talking about? $\endgroup$ Commented Nov 20, 2009 at 23:49
  • $\begingroup$ I'm sorry for not being clear - I've added two images in the question, maybe that'll do a better job! $\endgroup$
    – Jacob
    Commented Nov 21, 2009 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .