Rotate 3D (512*512*512 double) matrix
1 次查看(过去 30 天)
显示 更早的评论
Hi. I have a 3D matrix in double type (512*512*512 double) and I want to rotate 30 degree anticlockwise around central z-axis. Can anyone please give me an idea how to do this? Many thanks,
1 个评论
Matt J
2022-3-1
Where is the "central z-axis" in the coordinates of your 3D grid? Which way does it point?
采纳的回答
Walter Roberson
2022-2-28
The easiest way is to slice it into panes and rotate each pane and reassemble.
3 个评论
Walter Roberson
2022-3-1
for k=512:-1:1
newimg(k, :, :) = imrotate(squeeze(img(k, :, :), Angle)) ;
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactions, Camera Views, and Lighting 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!