How to achieve rotation invariant using inertia matrix?

12 visualizzazioni (ultimi 30 giorni)
I have a 3D binary image represented in a 3D matrix, my goal is to achieve rotation invariant using geometric moments.
When the image is centered at the origin, the principle axes of it can be defined as the eigenvectors of the inertia matrix I. The eigenvectors {} of the inertia matrix I define the rows of the rotation matrix. However, this leads to a problem in the selection of a unique rotation matrix, since both and are two eigenvectors related to the same eigenvalue.
In order to eliminate the ambiguity, I want to find a reference vector to ensure that the dot product of every eigenvector with the reference vector is positive. My question is how to choose this reference vector?
  1 Commento
Matt J
Matt J il 3 Giu 2023
It probably depends on the shape of the object and your preferences. If the object is a sphere, for example, u1,u2,u3 can be any selection of 3 orthogonal vectors. Accordingly, you could choose that reference vector to be anything.

Accedi per commentare.

Risposta accettata

Ayush
Ayush il 4 Giu 2023
Hi Huahua,
When computing the eigenvectors of the inertia matrix to obtain the rotation matrix, it is indeed possible to obtain two or more eigenvectors that are related to the same eigenvalue. In this case, there are different possible rotations that could give you the same moment-based descriptors or geometric moments.
To resolve this ambiguity, you can choose a reference vector that will help you determine the correct rotation matrix. One approach is to choose the centroid of your binary image as the reference vector, which will be a vector that points to the center of mass of your image. You can compute the centroid by taking the mean of the coordinates of all non-zero pixels in your binary image.
Once you have the centroid vector, you can compute the dot product between each eigenvector and the centroid vector, and select the eigenvectors that have a positive dot product with the centroid vector. These eigenvectors will define the rows of your rotation matrix.
Another approach is to choose a fixed reference vector, such as the positive x-axis, and then use the sign of the determinant of the transformation matrix to determine whether the chosen rotations is correct. If the determinant is positive, then the chosen transformation matrix can be used as the correct rotation matrix.
It is important to experiment with different reference vectors to see which one works best for your specific image data.
For any further clarification, do comment.
Hope it Helps!!
  2 Commenti
Huahua
Huahua il 5 Giu 2023
Modificato: Huahua il 5 Giu 2023
Thanks Ayush. I used to choose the centroid as the reference vector before I translated the object to the origin and this method helped me achieve rotation invariant. However, I was not sure if my thought was correct or not because I could not find some papers that used the same method.
Ayush
Ayush il 6 Giu 2023
Glad you like the answer, now as you mentioned ,using the centroid as the reference point to compute the rotation matrix is a very common technique in image processing. ofcourse, the centroid is a good choice because it is a geometric property that is invariant to translation and can be easily computed for binary images and by choosing the centroid as your reference point, you ensure that the rotation is performed around the center of mass of the object, which helps to make the moment-based descriptors invariant to rotation.
But However, please note that although choosing the centroid as the reference point can help achieve rotation invariance, but it is not always sufficient. In some cases, there may be other transformations that need to be performed to achieve full invariance to scale and orientation. Additionally, the choice of reference point can have an impact on the final results, so it is important to experiment with different reference points and techniques to find the best approach for your specific problem.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by