This is a static copy of a profile report

Home

imreconstruct (13839 calls, 110.753 sec)
Generated 05-Nov-2014 07:52:32 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/images/images/imreconstruct.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imclearborderfunction1721
imfillfunction12118
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
75
im = imreconstructmex(marker,m...
13839107.018 s96.6%
73
[marker,mask,conn] = ParseInpu...
138393.565 s3.2%
74
if nargin == 3
138390.020 s0.0%
All other lines  0.150 s0.1%
Totals  110.753 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
images/private/imreconstructmexMEX-file13839106.738 s96.4%
imreconstruct>ParseInputssubfunction138393.244 s2.9%
fullfilefunction10 s0%
iptgetpreffunction10 s0%
Self time (built-ins, overhead, etc.)  0.771 s0.7%
Totals  110.753 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function78
Non-code lines (comments, blank lines)72
Code lines (lines that can run)6
Code lines that did run3
Code lines that did not run3
Coverage (did run/can run)50.00 %
Function listing
   time   calls  line
1 function im = imreconstruct(varargin)
2 %IMRECONSTRUCT Morphological reconstruction.
3 % IM = IMRECONSTRUCT(MARKER,MASK) performs morphological reconstruction
4 % of the image MARKER under the image MASK. MARKER and MASK can be two
5 % intensity images or two binary images with the same size; IM is an
6 % intensity or binary image, respectively. MARKER must be the same size
7 % as MASK, and its elements must be less than or equal to the
8 % corresponding elements of MASK.
9 %
10 % By default, IMRECONSTRUCT uses 8-connected neighborhoods for 2-D
11 % images and 26-connected neighborhoods for 3-D images. For higher
12 % dimensions, IMRECONSTRUCT uses CONNDEF(NDIMS(I),'maximal').
13 %
14 % IM = IMRECONSTRUCT(MARKER,MASK,CONN) performs morphological
15 % reconstruction with the specified connectivity. CONN may have the
16 % following scalar values:
17 %
18 % 4 two-dimensional four-connected neighborhood
19 % 8 two-dimensional eight-connected neighborhood
20 % 6 three-dimensional six-connected neighborhood
21 % 18 three-dimensional 18-connected neighborhood
22 % 26 three-dimensional 26-connected neighborhood
23 %
24 % Connectivity may be defined in a more general way for any dimension by
25 % using for CONN a 3-by-3-by- ... -by-3 matrix of 0s and 1s. The 1-valued
26 % elements define neighborhood locations relative to the center element of
27 % CONN. CONN must be symmetric about its center element.
28 %
29 % Morphological reconstruction is the algorithmic basis for several
30 % other Image Processing Toolbox functions, including IMCLEARBORDER,
31 % IMEXTENDEDMAX, IMEXTENDEDMIN, IMFILL, IMHMAX, IMHMIN, and
32 % IMIMPOSEMIN.
33 %
34 % Class support
35 % -------------
36 % MARKER and MASK must be nonsparse numeric (including uint64 or int64)
37 % or logical arrays with the same class and any dimension. IM is of the
38 % same class as MARKER and MASK.
39 %
40 % Performance Note
41 % ----------------
42 % This function may take advantage of hardware optimization for datatypes
43 % logical, uint8 and single to run faster. Hardware optimization
44 % requires MARKER and MASK to be 2-D images and CONN to be either 4 or 8.
45 %
46 % Example 1
47 % ---------
48 % Perform opening-by-reconstruction to identify high intensity snowflakes.
49 %
50 % I = imread('snowflakes.png');
51 % mask = adapthisteq(I);
52 % se = strel('disk',5);
53 % marker = imerode(mask,se);
54 % obr = imreconstruct(marker,mask);
55 % figure, imshow(mask,[]), figure, imshow(obr,[])
56 %
57 % Example 2
58 % ---------
59 % Segment the letter "w" from text.png.
60 %
61 % mask = imread('text.png');
62 % marker = false(size(mask));
63 % marker(13,94) = true;
64 % im = imreconstruct(marker,mask);
65 % figure, imshow(mask), figure, imshow(im)
66 %
67 % See also IMCLEARBORDER, IMEXTENDEDMAX, IMEXTENDEDMIN, IMFILL, IMHMAX,
68 % IMHMIN, IMIMPOSEMIN.
69
70 % Copyright 1993-2009 The MathWorks, Inc.
71 % $Revision: 1.9.4.8 $ $Date: 2009/08/11 15:40:56 $
72
3.56 13839 73 [marker,mask,conn] = ParseInputs(varargin{:});
0.02 13839 74 if nargin == 3
107.02 13839 75 im = imreconstructmex(marker,mask,conn);
76 else
77 im = imreconstructmex(marker,mask);
78 end

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