So I am using the Matterport 3D dataset for my task and it has described the oriented bounding box using the standard structure with one change as follows:
"obb": {
"centroid":[3.39208,-1.72134,1.13262],
"axesLengths":[1.11588,0.619098,0.439177],
"dominantNormal":[-0.707107,-0.707107,0],
"normalizedAxes":[0,0,1,-0.707107,0.707107,0,-0.707107,-0.707107,0]
}
I understand that the oriented bounding box is typically defined by the centroid, local coordinate system axes, and lengths along those axes.
In my case, considering that the object is only rotated around the vertical axis (z-axis) in world coordinate frame, I want to find out the angle by which it is rotated around the z-axis. But for that, I need the rotation matrix which transforms the world coordinate system into the local coordinate system. In standard representation case, the rotation matrix is the just 3x3 matrix with the axes as column vectors. However, in this case, if you look at the normalized axes array there are 9 values given with no convention as to which axis should be the first column vector or second column vector in rotation matrix.
With the assumption that, the object position is vertical and rotated only around the z-axis, I can determine the last column of the rotation matrix. For example, [0, 0, 1] in the aforementioned example. But how to determine the other two axes? Is there a way to take "dominantNormal" information into consideration in determining that?