This is a static copy of a profile report

Home

tforminv (1721 calls, 8.221 sec)
Generated 05-Nov-2014 07:53:11 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/images/tforminv.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
tformarrayfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
68
varargout = tform('inv', nargo...
17218.201 s99.8%
All other lines  0.020 s0.2%
Totals  8.221 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
images/private/tformfunction17218.181 s99.5%
Self time (built-ins, overhead, etc.)  0.040 s0.5%
Totals  8.221 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function68
Non-code lines (comments, blank lines)67
Code lines (lines that can run)1
Code lines that did run1
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function varargout = tforminv(varargin)
2 %TFORMINV Apply inverse spatial transformation.
3 % TFORMINV applies an inverse spatial transformation based on a TFORM
4 % structure created with MAKETFORM, FLIPTFORM, or CP2TFORM.
5 %
6 % [U,V] = TFORMINV(T,X,Y) applies the 2D-to-2D inverse transformation
7 % defined in TFORM structure T to coordinate arrays X and Y, mapping
8 % the point [X(k) Y(k)] to the point [U(k) V(k)]. Both T.ndims_in
9 % and T.ndims_out must equal 2. X and Y will typically be column
10 % vectors matching in length. In general, X and Y can have any
11 % dimensionality, but must have the same size. In any case, U and V
12 % will have the same size as X and Y.
13 %
14 % [U1,U2,U3,...] = TFORMINV(T,X1,X2,X3,...) applies the NDIMS_OUT-to-
15 % NDIMS_IN inverse transformation defined in TFORM structure T to the
16 % coordinate arrays X1,X2,...,XNDIMS_OUT (where NDIMS_IN = T.ndims_in
17 % and NDIMS_OUT = T.ndims_out). The number of output arguments
18 % must equal NDIMS_IN. The transformation maps the point
19 % [X1(k) X2(k) ... XNDIMS_OUT(k)]
20 % to the point
21 % [U1(k) U2(k) ... UNDIMS_IN(k)].
22 % X1,X2,X3,... can have any dimensionality, but must be the same size.
23 % U1,U2,U3,... will have this size also.
24 %
25 % U = TFORMINV(T,X) applies the NDIMS_OUT-to-NDIMS_IN inverse
26 % transformation defined in TFORM structure T to each row of X, where
27 % X is an M-by-NDIMS_OUT matrix. It maps the point X(k,:) to the
28 % point U(k,:). U will be an M-by-NDIMS_IN matrix.
29 %
30 % U = TFORMINV(T,X), where X is an (N+1)-dimensional array, maps
31 % the point X(k1,k2,...,kN,:) to the point U(k1,k2,...,kN,:).
32 % SIZE(X,N+1) must equal NDIMS_OUT. U will be an (N+1)-dimensional
33 % array, with SIZE(U,I) equal to SIZE(X,I) for I = 1,...,N and
34 % SIZE(U,N+1) equal to NDIMS_IN.
35 %
36 % [U1,U2,U3,...] = TFORMINV(T,X) maps an (N+1)-dimensional array
37 % to NDIMS_IN equally-sized N-dimensional arrays.
38 %
39 % U = TFORMINV(T,X1,X2,X3,...) maps NDIMS_OUT N-dimensional arrays
40 % to one (N+1)-dimensional array.
41 %
42 % Note
43 % ----
44 % U = TFORMINV(X,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 TFORMINV:
60 %
61 % [um, vm] = tforminv(tform, x, y) % Results should equal [u, v]
62 %
63 % See also TFORMFWD, MAKETFORM, FLIPTFORM, CP2TFORM.
64
65 % Copyright 1993-2003 The MathWorks, Inc.
66 % $Revision: 1.9.4.2 $ $Date: 2003/05/03 17:52:41 $
67
8.20 1721 68 varargout = tform('inv', nargout, varargin{:});