imrotate3_fast

バージョン 1.1.0.0 (312 KB) 作成者: Dave
Fast 3D image rotations
ダウンロード: 334
更新 2017/8/5

ライセンスの表示

This function performs fast rotation of three-dimensional matrices.
When working with transformation of large three-dimensional data, speed can be critical. The imwarp function, and (released in R2017a) the imrotate3 function (which uses imwarp) in the image processing toolbox perform these rotations orders of magnitude slower than the imrotate function does in two dimensions. The cost is not simply due to the increased complexity of a three-dimensional rotation, but rather is because the imrotate function uses some super-speedy mex code.
Here, I've defined a three dimensional rotation problem in terms of an ordered series of two dimensional rotations, and used the permute function to apply imrotate to the appropriate dimensions. Even with the cost of rearranging the dimensions, this approach produced much quicker results.
imrotate3_fast provides a few other potential speed advantages. 1. Because rotations are computed in series, rotations applied to only one or two of the axes are even faster. 2. Because imwarp seems to work natively with floating points, it becomes much slower with integers, conversely imrotate works faster with integers. So for 3D rotations of volumetric integer data (e.g. microscopy data), the speed differences are enormous, and allow for reduced memory demands.
Note: imrotate3 performs a single rotation around an arbitrary axis (axis-angle), whereas imrotate3_fast takes a series of rotations around the x,y,z axes (Euler angles). It made sense to me to keep the inputs in this format, but I've included convenience functions for converting between Euler and Axis-Angle.
Speed tests were performed on a 64-bit PC with an i7-4790 and 32gb of RAM, running Windows. I included data (separately) collected under conditions where ample free physical memory was available, and where it fell short. The code for these tests is also included.

引用

Dave (2024). imrotate3_fast (https://www.mathworks.com/matlabcentral/fileexchange/64002-imrotate3_fast), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2017a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.1.0.0

Code not altered, just adding an image showing the results of speed tests to the file description.

1.0.0.0