This is a static copy of a profile report

Home

images/private/morphop>NhoodShapesOrthogonal (12120 calls, 6.639 sec)
Generated 05-Nov-2014 07:53:20 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)

Function NameFunction TypeCalls
images/private/morphop>ParseInputssubfunction12120
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
406
nhood_size = size(getnhood(se(...
727205.177 s78.0%
407
P(k,1:numel(nhood_size)) = nho...
727200.531 s8.0%
413
TF = any( sum(P~=1,1) == 1);
121200.230 s3.5%
408
end
727200.210 s3.2%
401
num_strels = numel(se);
121200.120 s1.8%
All other lines  0.371 s5.6%
Totals  6.639 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strel>strel.getnhoodsubfunction727203.214 s48.4%
Self time (built-ins, overhead, etc.)  3.425 s51.6%
Totals  6.639 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function26
Non-code lines (comments, blank lines)18
Code lines (lines that can run)8
Code lines that did run8
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
388 function TF = NhoodShapesOrthogonal(se)
389
390 % Algorithm:
391 % * Create a matrix P where each row contains the size vector for the nhood of
392 % one strel in the sequence se. (se is already a sequence so we don't need to
393 % call getsequence(se) again here.)
394 %
395 % * Trailing singleton dimensions are added as needed for strels with fewer
396 % dimensions.
397 %
398 % * Find all values of P~=1. If there's only one of these in each column,
399 % the set of strels se is orthogonal.
400
0.12 12120 401 num_strels = numel(se);
402
0.09 12120 403 P = ones(num_strels,2);
404
0.06 12120 405 for k = 1:num_strels
5.18 72720 406 nhood_size = size(getnhood(se(k)));
0.53 72720 407 P(k,1:numel(nhood_size)) = nhood_size;
0.21 72720 408 end
409
410 % Fill in trailing singleton dimensions as needed
0.07 12120 411 P(P==0) = 1;
412
0.23 12120 413 TF = any( sum(P~=1,1) == 1);