![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1214663/image.png)
I am trying to make a tform transformation matric, but I am getting below error once , can you please assit me to fix it?
조회 수: 48 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Sakshay
2022년 12월 1일
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1214663/image.png)
% 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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!