I am trying to make a tform transformation matric, but I am getting below error once , can you please assit me to fix it?
45 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm gonna project a point cloud on an image which I have transformation elements such as rotation and translation matrices as below:
Rotation =
0.0499 0.999 -0.0213
-0.0283 0.0228 0.999
0.998 -0.0493 0.0294
Translation =
2.489e+06 7.4404e+06 9.58
tform = rigidtform3d(Rotation,Translation)
Error using images.geotrans.internal.rigidtform3dImpl
Invalid rotation matrix.
Error in rigidtform3d (line 8)
self = self@images.geotrans.internal.rigidtform3dImpl(varargin{:});
0 Kommentare
Antworten (1)
Sakshay
am 1 Dez. 2022
Hello Abbas,
As per my understanding you are trying to create the "rigidtform3d" object using the Rotation Matrix and Translation Vector. But, you are getting an error indicating an incorrect Rotation Matrix.
A valid rotation matrix should satisfy the following constraints:
MATLAB does these internal checks before assigning the Rotation Matrix. For your case, the rotation matrix does not seem to satisfy the constraints (accuracy upto ), as in the following code:
% Assign Rotation Matrix
R = [0.0499, 0.9990, -0.0213; -0.0283, 0.0228, 0.9990; 0.9980, -0.0493, 0.0294];
% Test 1
R' * R
R * R'
% Test 2
det(R)
You can try to generate a rotation matrix from euler angles, using the "eul2rotm" function. Please refer to the following documentation for more information on the same:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Geometric Transformation and Image Registration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!