This is a static copy of a profile reportHome
maketform>trans_affine (3442 calls, 3.875 sec)
Generated 05-Nov-2014 07:53:09 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/maketform.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
220 | U1 = X1 * M; ... | 3442 | 1.873 s | 48.3% |  |
219 | X1 = [X ones(size(X,1),1)]; ... | 3442 | 1.582 s | 40.8% |  |
221 | U = U1(:,1:end-1); ... | 3442 | 0.310 s | 8.0% |  |
211 | if strcmp(direction,'forward') | 3442 | 0.040 s | 1.0% |  |
213 | elseif strcmp(direction,'inver... | 1721 | 0.030 s | 0.8% |  |
All other lines | | | 0.040 s | 1.0% |  |
Totals | | | 3.875 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 19 |
Non-code lines (comments, blank lines) | 9 |
Code lines (lines that can run) | 10 |
Code lines that did run | 7 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 70.00 % |
Function listing
time calls line
203 function U = trans_affine( X, t, direction )
204
205 % Forward/inverse affine transformation method
206 %
207 % T is an affine transformation structure. X is the row vector to
208 % be transformed, or a matrix with a vector in each row.
209 % DIRECTION is either 'forward' or 'inverse'.
210
0.04 3442 211 if strcmp(direction,'forward')
1721 212 M = t.tdata.T;
0.03 1721 213 elseif strcmp(direction,'inverse')
1721 214 M = t.tdata.Tinv;
215 else
216 error(message('images:maketform:invalidDirection'))
217 end
218
1.58 3442 219 X1 = [X ones(size(X,1),1)]; % Convert X to homogeneous coordinates
1.87 3442 220 U1 = X1 * M; % Transform in homogeneous coordinates
0.31 3442 221 U = U1(:,1:end-1); % Convert homogeneous coordinates to U
Other subfunctions in this file are not included in this listing.