This is a static copy of a profile reportHome
images/private/morphop>getPadValue (12524 calls, 0.170 sec)
Generated 05-Nov-2014 07:53:22 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/private/morphop.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 |
98 | if strcmp(op_type, 'dilate') | 12524 | 0.050 s | 29.4% |  |
104 | if islogical(A) | 12524 | 0.020 s | 11.8% |  |
101 | pad_value = Inf; | 6060 | 0.020 s | 11.8% |  |
100 | else | 6060 | 0.020 s | 11.8% |  |
99 | pad_value = -Inf; | 6464 | 0.020 s | 11.8% |  |
All other lines | | | 0.040 s | 23.5% |  |
Totals | | | 0.170 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 14 |
Non-code lines (comments, blank lines) | 6 |
Code lines (lines that can run) | 8 |
Code lines that did run | 8 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
94 function pad_value = getPadValue(A, op_type)
95 % Returns the appropriate pad value, depending on whether we are performing
96 % erosion or dilation, and whether or not A is logical (binary).
97
0.05 12524 98 if strcmp(op_type, 'dilate')
0.02 6464 99 pad_value = -Inf;
0.02 6060 100 else
0.02 6060 101 pad_value = Inf;
0.01 6060 102 end
103
0.02 12524 104 if islogical(A)
105 % Use 0s and 1s instead of plus/minus Inf.
202 106 pad_value = max(min(pad_value, 1), 0);
202 107 end
Other subfunctions in this file are not included in this listing.