This chapter introduces our algorithm for calculating ECSP of an edge pixel, ECSP of an edge, the multi-derivative ECSP functions, and its corresponding region of interest (ROI). We first present the descriptor ECSP and its ROI. We then present a profile extractor for the calculation method of ECSP and its ROI.
3.1 Profile Descriptor
ECSP function for an edge pixel: Let I( be the intensity value of an edge pixel for
5 6 1, … , 9, where M is the total number of pixels on this edge. The vector denotes the pixel at the coordinate :, ; on a 2D image. We define a unit vector as an edge tangent passing and a unit vector as an edge normal perpendicular to pointing to the concave side of the edge. See Figure 3.1. The ECSP function for the edge pixel is defined as
< " = · , 6 ?@ AB,BAC , 6 D, (3.1)
whereris the pixel distance (called radius) in an integer set D from the edge pixel along its edge normal . The maximum value of r is inversely proportional to the edge curvature E and scaled by a positive constant . This maximum radius r value depends on edge curvature. Therefore, object scales are reflected by radius r on ECSP functions. That is a large radius reflects a large size object relative to the image size and a small radius reflects a small size object relative to the image size.
ECSP region of interest (ROI): Let a row vector represent all points on function starting from < @/E to < /E. We define a matrix
!" < G…H I
J.
Figure 3.1 (b) shows the plot of the intensity values in matrix ROI obtained from the corresponding edge in Figure 3.1 (a). The matrix ROI is divided into two equal size sub-matrices: the left-half
sub-matrix !"#$ &K and the right-half sub-matrix !"#$ #%&. !"#$ &K consists of pixels taken from the outer side of the edge/contour and !"#$ #%& consists of pixels taken from the inner side of the edge. We call the matrix ROI as the region of interest of ECSP.
i
nρ
iuρ
κ λ/ − convexROI ROIconcave edge
x
y
κ λ/ i vρ concave ROI convex ROI κ λ/ 2⋅ (a) (b)Figure 3.1: ECSP extraction of an edge in (a) to the corresponding ROI in (b). The vector L M indicates the position of an edge pixel with its tangent vector N and normal vector OM . The edge has M its surrounding region of interest labeled as ROIconcave and ROIconvex with the dashed lines indicating
the edge pixels as region boundaries.
ECSP function for an entire edge: We define the ECSP function for an entire edge j as
-P < QRS51TH, … , IU, 6 ?@ A B, A BC , 6 D. (3.2)
A median value for the same r values on these functions is selected because of its robustness to speckle and specular noises caused by light reflection.
Multi-derivative ECSP functions: The multi-derivative ECSP functions are represented as a set of functions W-, -, X-, … Y, where each element XZ- is the kth-order derivative of the functionF(r). As the calculation of derivative function amplifies noise, the maximum order of derivative K needs to be empirically found in the training data. We select K based on the criteria that the patterns caused by noises and real object are discriminative on the derivative functions. To resist the noise, a function is smoothed using the moving average smoothing method [71] before the calculation of its derivative.
3.2 Profile Extractor
The key to extract ECSP is to obtain the edge normal for edge pixel and the edge curvature κ . We calculate edge normal and edge curvature as follows.
Calculation of edge normal O: To calculate M , we first obtain the edge tangent vector by fitting all Q edge pixels inside a square window [ centered at using the least squares linear regression model. We normalize : as :\ < : @ QR1:+,…
]^/_`S:+,…]^ where mean and
std represent the mean and the standard deviation of x-coordinates of all pixels (denoted as:+,…
]^) in [, respectively. This normalization is important to correctly calculate as it improves the numerical properties for the linear regression model [71] [72]. Using :\ as the predictor, and the corresponding ; as the response in the regression model, we obtain its 1st degree coefficient a. The edge tangent can be derived as < b c^
dHc^4 , H
dHc^4
ef. We finally obtain edge normal using
< g · , where the rotation matrix R uses the rotation angle α of either – i/2 or i/2 depending on which angle results in the calculated pointing to the concave side of the edge. We will discuss our method to determinate the concave side of an edge in a later paragraph. The outlier norm vectors are detected and replaced by the median value of the norm vectors in a square window
Ai. A norm vector is declared as an outlier if the angle difference between the norm vector and the
median value is larger than a threshold Thlddegree. The value of Thlddegree depends on the size of Ai. A
larger Ai requires a larger value of Thlddegree. After this step, we obtain refined norm vectors of edge
pixels pointing toward the concave side of the edge. Figure 3.2 shows some results of calculated edge normal for some types of objects.
Calculation of edge curvature k: To calculate the curvature E of an entire edge, we compute the median value of local curvatures for all M edge pixels, written as E < QRS51WEYHI. Each local pixel curvature is represented by E < l/Q, where the angle l is the maximum angle among every pair of edge normal vectorsin the window [.
We use the following method to determinate the concave side and convex side of an edge. We compute the minimum bounding rectangle that encloses the edge and find two regions, Rconcave and
Rconvex, separated by the edge as follows. We use region growing taking the center of the minimum
bounding rectangle as the seed point to group pixels starting from the seed point. The resulting region is called Rconcave. The rest of the pixels in the minimum bounding rectangle that do not belong to
Rconcave are assigned to Rconvex. As a result, for most edges, Rconcave is the region at the concave side of
the edge and Rconvex is the region at the convex side of the edge.
(a) (b) (c) (d) (e)
Figure 3.2: Top row: Original image; Bottom row: Image labeled with calculated edge normals (blue arrows). (a) Appendiceal orifice image; (b) Diverticulum image; (c) Colon lumen image with the lumen appearing as the dark region in the middle of the image; (d) Colon lumen image with the lumen appearing as the non-dark region in the middle of the image and darkest region at right side, and with nested multiple folds; (e) Flat polyp image
We plot multi-derivative ECSP functions of some commonly seen objects in Figure 3.3 including the three representative objects. The profiles of different objects show different patterns. For different objects whose ECSP functions appear similar, their function values are generally in different ranges (e.g., Figure 3.3 (d) and (e)).
Figure 3.3:Multi-derivative ECSP of different types of colonoscopic objects. First row: Original gray scale image marked with a white bar representing the edge cross-section of an edge pixel; Second row: the corresponding intensity edge cross-section profile; Third row: the gradient profile; Fourth row: the second-order derivative edge profile. (a) Polyp image; (b) Appendiceal orifice image; (c) Lumen image with the lumen in the middle of the image and with multiple nested folds; (d) Colon fold; (e) Endoscope seen during retroflexion