This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
353 | BWholes = imclearborder(BWcomp... | 1721 | 6.088 s | 88.4% |  |
356 | L = bwlabel(BWholes, backgroun... | 1721 | 0.591 s | 8.6% |  |
350 | BWcomplement = imcomplement(BW... | 1721 | 0.100 s | 1.5% |  |
357 | B = bwboundariesmex(L, backgro... | 1721 | 0.070 s | 1.0% |  |
345 | else | 1721 | 0.010 s | 0.1% |  |
All other lines | | | 0.030 s | 0.4% |  |
Totals | | | 6.890 s | 100% | |
Children (called functions)
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 19 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 9 |
Code lines that did run | 8 |
Code lines that did not run | 1 |
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);