This is a static copy of a profile reportHome
bwboundaries>parseInputs (1721 calls, 0.381 sec)
Generated 05-Nov-2014 07:52:43 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/bwboundaries.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 |
160 | iptcheckinput(BW, {'numeric','... | 1721 | 0.060 s | 15.8% |  |
156 | iptchecknargin(1,4,nargin,mfil... | 1721 | 0.060 s | 15.8% |  |
180 | iptcheckinput(conn, {'double'}... | 1721 | 0.050 s | 13.2% |  |
181 | if (conn~=4 && conn~=8... | 1721 | 0.040 s | 10.5% |  |
179 | conn = varargin{2}; | 1721 | 0.030 s | 7.9% |  |
All other lines | | | 0.140 s | 36.8% |  |
Totals | | | 0.381 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
iptcheckinput | MEX-file | 3442 | 0.040 s | 10.5% |  |
iptchecknargin | function | 1721 | 0.030 s | 7.9% |  |
Self time (built-ins, overhead, etc.) | | | 0.310 s | 81.6% |  |
Totals | | | 0.381 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 51 |
Non-code lines (comments, blank lines) | 12 |
Code lines (lines that can run) | 39 |
Code lines that did run | 17 |
Code lines that did not run | 22 |
Coverage (did run/can run) | 43.59 % |
Function listing
time calls line
154 function [BW, conn, findholes] = parseInputs(varargin)
155
0.06 1721 156 iptchecknargin(1,4,nargin,mfilename);
157
0.01 1721 158 BW = varargin{1};
159
0.06 1721 160 iptcheckinput(BW, {'numeric','logical'}, {'real','2d','nonsparse'}, ...
161 mfilename, 'BW', 1);
162
0.01 1721 163 if ~islogical(BW)
164 BW = BW ~= 0;
165 end
166
0.02 1721 167 firstStringToProcess = 0;
168
0.03 1721 169 if nargin < 2
170 conn = 8;
1721 171 else
0.01 1721 172 if ischar(varargin{2})
173 firstStringToProcess = 2;
174 conn = 8;
0.01 1721 175 else
0.01 1721 176 if nargin > 2,
177 firstStringToProcess = 3;
178 end
0.03 1721 179 conn = varargin{2};
0.05 1721 180 iptcheckinput(conn, {'double'}, {}, mfilename, 'CONN', 2);
0.04 1721 181 if (conn~=4 && conn~=8)
182 error(message('images:bwboundaries:badScalarConn'));
183 end
0.01 1721 184 end
1721 185 end
186
1721 187 findholes = true;
188
0.01 1721 189 if firstStringToProcess
190 validStrings = {'noholes', 'holes'};
191
192 for k = firstStringToProcess:nargin
193 % check for options
194 string = iptcheckstrs(varargin{k}, validStrings, mfilename, 'OPTION', k);
195 switch string
196 case 'noholes'
197 findholes = false;
198 case 'holes'
199 findholes = true;
200 otherwise
201 error(message('images:bwboundaries:unexpectedError'))
202 end
203 end
204 end
Other subfunctions in this file are not included in this listing.