This is a static copy of a profile reportHome
tformfwd (1721 calls, 0.981 sec)
Generated 05-Nov-2014 07:53:11 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/images/tformfwd.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 |
68 | varargout = tform('fwd', nargo... | 1721 | 0.971 s | 99.0% |  |
All other lines | | | 0.010 s | 1.0% |  |
Totals | | | 0.981 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
images/private/tform | function | 1721 | 0.921 s | 93.9% |  |
Self time (built-ins, overhead, etc.) | | | 0.060 s | 6.1% |  |
Totals | | | 0.981 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 68 |
Non-code lines (comments, blank lines) | 67 |
Code lines (lines that can run) | 1 |
Code lines that did run | 1 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function varargout = tformfwd(varargin)
2 %TFORMFWD Apply forward spatial transformation.
3 % TFORMFWD applies a forward spatial transformation based on a TFORM
4 % structure created with MAKETFORM, FLIPTFORM, or CP2TFORM.
5 %
6 % [X,Y] = TFORMFWD(T,U,V) applies the 2D-to-2D spatial transformation
7 % defined in TFORM structure T to coordinate arrays U and V, mapping
8 % the point [U(k) V(k)] to the point [X(k) Y(k)]. Both T.ndims_in
9 % and T.ndims_out must equal 2. U and V will typically be column
10 % vectors matching in length. In general, U and V can have any
11 % dimensionality, but must have the same size. In any case, X and Y
12 % will have the same size as U and V.
13 %
14 % [X1,X2,X3,...] = TFORMFWD(T,U1,U2,U3,...) applies the NDIMS_IN-to-
15 % NDIMS_OUT spatial transformation defined in TFORM structure T to the
16 % coordinate arrays U1,U2,...,UNDIMS_IN (where NDIMS_IN = T.ndims_in
17 % and NDIMS_OUT = T.ndims_out). The number of output arguments
18 % must equal NDIMS_OUT. The transformation maps the point
19 % [U1(k) U2(k) ... UNDIMS_IN(k)]
20 % to the point
21 % [X1(k) X2(k) ... XNDIMS_OUT(k)].
22 % U1,U2,U3,... can have any dimensionality, but must be the same size.
23 % X1,X2,X3,... will have this size also.
24 %
25 % X = TFORMFWD(T,U) applies the NDIMS_IN-to-NDIMS_OUT spatial
26 % transformation defined in TFORM structure T to each row of U, where
27 % U is an M-by-NDIMS_IN matrix. It maps the point U(k,:) to the
28 % point X(k,:). X will be an M-by-NDIMS_OUT matrix.
29 %
30 % X = TFORMFWD(T,U), where U is an (N+1)-dimensional array, maps
31 % the point U(k1,k2,...,kN,:) to the point X(k1,k2,...,kN,:).
32 % SIZE(U,N+1) must equal NDIMS_IN. X will be an (N+1)-dimensional
33 % array, with SIZE(X,I) equal to SIZE(U,I) for I = 1,...,N and
34 % SIZE(X,N+1) equal to NDIMS_OUT.
35 %
36 % [X1,X2,X3,...] = TFORMFWD(T,U) maps an (N+1)-dimensional array
37 % to NDIMS_OUT equally-sized N-dimensional arrays.
38 %
39 % X = TFORMFWD(T,U1,U2,U3,...) maps NDIMS_IN N-dimensional arrays
40 % to one (N+1)-dimensional array.
41 %
42 % Note
43 % ----
44 % X = TFORMFWD(U,T) is an older form of the two-argument syntax
45 % that remains supported for backward compatibility.
46 %
47 % Example
48 % -------
49 % Create an affine transformation that maps the triangle with vertices
50 % (0,0), (6,3), (-2,5) to the triangle with vertices (-1,-1), (0,-10),
51 % (4,4):
52 %
53 % u = [ 0 6 -2]';
54 % v = [ 0 3 5]';
55 % x = [-1 0 4]';
56 % y = [-1 -10 4]';
57 % tform = maketform('affine',[u v],[x y]);
58 %
59 % Validate the mapping by applying TFORMFWD:
60 %
61 % [xm, ym] = tformfwd(tform, u, v) % Results should equal [x, y]
62 %
63 % See also TFORMINV, MAKETFORM, FLIPTFORM, CP2TFORM.
64
65 % Copyright 1993-2003 The MathWorks, Inc.
66 % $Revision: 1.8.4.2 $ $Date: 2003/05/03 17:52:40 $
67
0.97 1721 68 varargout = tform('fwd', nargout, varargin{:});