This is a static copy of a profile report

Home

strel>MakeArbitraryStrel (1721 calls, 0.651 sec)
Generated 05-Nov-2014 07:53:18 using cpu time.
subfunction in file /usr1/opt/matlab/7.13/toolbox/images/images/strel.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
strel>strel.strelsubfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
703
se = strel;
17210.551 s84.6%
704
se.nhood = nhood ~= 0;
17210.060 s9.2%
707
if (~isempty(nhood) &&...
17210.020 s3.1%
705
se.height = height;
17210.010 s1.5%
726
end
17210 s0%
All other lines  0.010 s1.5%
Totals  0.651 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strel>strel.strelsubfunction17210.461 s70.8%
Self time (built-ins, overhead, etc.)  0.190 s29.2%
Totals  0.651 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function26
Non-code lines (comments, blank lines)9
Code lines (lines that can run)17
Code lines that did run5
Code lines that did not run12
Coverage (did run/can run)29.41 %
Function listing
   time   calls  line
701 function se = MakeArbitraryStrel(nhood,height)
702
0.55 1721 703 se = strel;
0.06 1721 704 se.nhood = nhood ~= 0;
0.01 1721 705 se.height = height;
706
0.02 1721 707 if (~isempty(nhood) && all(nhood(:)) && ~any(height(:)))
708 % Strel is flat with an all-ones neighborhood. Decide whether to decompose
709 % it.
710 size_nhood = size(nhood);
711 % Heuristic --- if theoretical computation advantage is
712 % at least a factor of two, then assume that the advantage
713 % is worth the overhead cost of performing dilation or erosion twice.
714 advantage = prod(size_nhood) / sum(size_nhood);
715 if (advantage >= 2)
716 num_dims = ndims(nhood);
717 se.decomposition = strel;
718 for k = 1:ndims(nhood)
719 size_k = ones(1,num_dims);
720 size_k(k) = size(nhood,k);
721 se.decomposition(k) = strel(ones(size_k));
722 end
723 end
724 end
725
1721 726 end

Other subfunctions in this file are not included in this listing.