This is a static copy of a profile report

Home

bwboundaries>FindHoleBoundaries (1721 calls, 6.890 sec)
Generated 05-Nov-2014 07:53:16 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)

Function NameFunction TypeCalls
bwboundariesfunction1721
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
353
BWholes = imclearborder(BWcomp...
17216.088 s88.4%
356
L = bwlabel(BWholes, backgroun...
17210.591 s8.6%
350
BWcomplement = imcomplement(BW...
17210.100 s1.5%
357
B = bwboundariesmex(L, backgro...
17210.070 s1.0%
345
else
17210.010 s0.1%
All other lines  0.030 s0.4%
Totals  6.890 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
imclearborderfunction17216.068 s88.1%
bwlabelfunction17210.571 s8.3%
imcomplementfunction17210.090 s1.3%
images/private/bwboundariesmexMEX-file17210.010 s0.1%
Self time (built-ins, overhead, etc.)  0.150 s2.2%
Totals  6.890 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function19
Non-code lines (comments, blank lines)10
Code lines (lines that can run)9
Code lines that did run8
Code lines that did not run1
Coverage (did run/can run)88.89 %
Function listing
   time   calls  line
339 function [B, L]= FindHoleBoundaries(BW, conn)
340
341 % Avoid topological errors. If objects are 8 connected, then holes
342 % must be 4 connected and vice versa.
1721 343 if (conn == 4)
344 backgroundConn = 8;
0.01 1721 345 else
1721 346 backgroundConn = 4;
1721 347 end
348
349 % Turn holes into objects
0.10 1721 350 BWcomplement = imcomplement(BW);
351
352 % clear unwanted "hole" objects from the border
6.09 1721 353 BWholes = imclearborder(BWcomplement, backgroundConn);
354
355 % get the holes!
0.59 1721 356 L = bwlabel(BWholes, backgroundConn);
0.07 1721 357 B = bwboundariesmex(L, backgroundConn);