Once the matrices of scaling coefficients have been computed, features across scales can be detected. While lesions can vary in size by several orders of magnitude, small lesions at a high resolution are visually very similar to large lesions at a low resolution, appearing as distinct foci of bright pixels. Measuring the gradient vectors of the images allows lesions to be detected as areas of gradient vector convergence, and by leveraging a multiresolution representation of the image, similar methods of detection can be used for lesions of all sizes. Due to the noise inherent in images, as well as irregularities in lesion shape and internal structure, we apply the gradient diffusion procedure of Li et al. [
3], with minor alterations to adapt the method to two dimensions. This method was motivated by the high density of nuclei and diffuse boundary properties in microscopic embryo images of
C. elegans.
The image is modeled as a deformable elastic sheet, where the gradient vector field
\(\mathbf {v}(x,y) = (u(x,y),v(x,y))\), with horizontal component
u(
x,
y) and vertical component
v(
x,
y), form solutions to the Navier–Stokes equation [
26]:
$$\begin{aligned} \mu \triangledown ^2\mathbf {v}+(\lambda + \mu )\triangledown \text {div}(\mathbf {v}) + (\triangledown {f}-\mathbf {v}) = 0 \end{aligned}$$
(4)
where
\(\triangledown ^2\) is the Laplacian operator,
\(\triangledown \) is the gradient operator,
\(\text {div}\) is the divergence operator, and
\(\triangledown {f}\) is the original gradient. This equation is solved using a finite difference method, decoupling
\(\mathbf {v}\) and treating
u and
v as functions of time:
$$\begin{aligned} u_t(x,y,t)= & {} \mu \triangledown ^2u(x,y,t) \nonumber \\&+\, (\lambda + \mu )(\triangledown \text {div}(\mathbf {v}(x,y,t)))_x \nonumber \\&+\, ((\triangledown {f}(x,y))_x - u(x,y,t)) \nonumber \\ v_t(x,y,t)= & {} \mu \triangledown ^2v(x,y,t) \nonumber \\&+\, (\lambda + \mu )(\triangledown \text {div}(\mathbf {v}(x,y,t)))_y \nonumber \\&+\, ((\triangledown {f}(x,y))_y - v(x,y,t)) \end{aligned}$$
(5)
Consistent with the approach of [
3],
\(\Delta x\),
\(\Delta y\), and
\(\Delta t\) are taken to be 1, and with indices
i and
j corresponding to
x and
y, respectively:
$$\begin{aligned} u_t= & {} u_{i,j}^{n+1} - u_{i,j}^{n}, v_t = v_{i,j}^{n+1} - v_{i,j}^n \nonumber \\ \triangledown ^2u= & {} u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1} - 4u_{i,j} \nonumber \\ \triangledown ^2v= & {} v_{i+1,j} + v_{i-1,j} + v_{i,j+1} + v_{i,j-1} - 4v_{i,j} \nonumber \\ (\triangledown \text {div}(\mathbf {v}))_x= & {} u_{i+1,j} + u_{i-1,j} - 2u_{i,j} + v_{i+1,j+1} \nonumber \\&- v_{i,j+1} - v_{i+1,j} + v_{i,j} \nonumber \\ (\triangledown \text {div}(\mathbf {v}))_y= & {} v_{i,j+1} + v_{i,j-1} - 2v_{i,j} \nonumber \\&+\, u_{i+1,j+1} - u_{i+1,j} - u_{i,j+1} + u_{i,j} \nonumber \\ (\triangledown {f})_x= & {} 2f_{i+1,j} + f_{i+1,j-1} + f_{i+1,j+1} \nonumber \\&- 2f_{i-1,j} - f_{i-1,j-1} - f_{i-1,j+1} \nonumber \\ (\triangledown {f})_y= & {} 2f_{i,j+1} + f_{i-1,j+1} + f_{i+1,j+1} \nonumber \\&- 2f_{i,j-1} - f_{i-1,j-1} - f_{i+1,j-1} \end{aligned}$$
(6)
The equations for the horizontal gradient components
\((\triangledown {f})_x\) and the vertical gradient components
\((\triangledown {f})_y\) of the original gradient field are analogous to the Sobel filter, a common technique for approximating image gradients.
To create a consensus image, the divergence values at each resolution are expanded to the native resolution (e.g., all pixels that are at half scale are repeated twice vertically and horizontally, pixels that are one quarter scale are repeated four times, etc.,), and the minimum at each pixel coordinate is found across the calculated divergence matrices. Gradient vector diffusion at multiple resolutions automatically enhances the gradient features of a lesion at the resolution that it is most readily detectable, and reexpansion to the native resolution allows for a similar active contours refinement to be calculated on lesions of all sizes. Lesions are detected as pixels with a divergence of less than
\(-45\). This consensus image provides an “initial guess” for implementation of an active contour algorithm, which provides the final segmentation (see Fig.
4d, e).