This is a static copy of a profile report

Home

strel>MakeLineStrel (404 calls, 3.805 sec)
Generated 05-Nov-2014 07:52:52 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.strelsubfunction404
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
847
se = strel;
4043.275 s86.1%
858
se.nhood = false(M,N);
4040.320 s8.4%
855
[c,r] = iptui.intline(-x,x,-y,...
4040.090 s2.4%
859
idx = sub2ind([M N], r + max(a...
4040.040 s1.1%
861
se.height = zeros(M,N);
4040.030 s0.8%
All other lines  0.050 s1.3%
Totals  3.805 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
strel>strel.strelsubfunction4043.255 s85.5%
intlinefunction4040.080 s2.1%
sub2indfunction4040.010 s0.3%
Self time (built-ins, overhead, etc.)  0.461 s12.1%
Totals  3.805 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function22
Non-code lines (comments, blank lines)7
Code lines (lines that can run)15
Code lines that did run13
Code lines that did not run2
Coverage (did run/can run)86.67 %
Function listing
   time   calls  line
845 function se = MakeLineStrel(len,theta_d)
846
3.27 404 847 se = strel;
848
0.01 404 849 if (len >= 1)
850 % The line is constructed so that it is always symmetric with respect
851 % to the origin.
404 852 theta = theta_d * pi / 180;
404 853 x = round((len-1)/2 * cos(theta));
404 854 y = -round((len-1)/2 * sin(theta));
0.09 404 855 [c,r] = iptui.intline(-x,x,-y,y);
0.01 404 856 M = 2*max(abs(r)) + 1;
0.01 404 857 N = 2*max(abs(c)) + 1;
0.32 404 858 se.nhood = false(M,N);
0.04 404 859 idx = sub2ind([M N], r + max(abs(r)) + 1, c + max(abs(c)) + 1);
0.02 404 860 se.nhood(idx) = 1;
0.03 404 861 se.height = zeros(M,N);
862 else
863 % Do nothing here, which effectively returns the empty strel.
864 end
865
404 866 end

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