In the preprocessing stage, image data are first normalized by avoiding extra parts from the background. This process starts with cropping and resizing of the image and is then trailed by dehazing and grayscale conversion of the WBC images.
3.1.2. Image Compliment
While collecting WBC images, some noisy and unwanted dark regions are found in the cytoplasm. To remove the unwanted dark areas, the image complement method is applied. In this method, a single value of colored pixels in discrete form is presented in the true-color (RGB) image shown in
Figure 4a, and an image is converted into its complimented image, as presented in
Figure 4b. Without using the image compliment function, the cytoplasm region remains dark with other objects (i.e., platelets, antibodies, etc.) inside the cytoplasm, which affects the efficiency of the image enhancement process. The compliment process is mathematically written as:
where
is the local patch in a color image, and
is the complimented image. Where (
i,
j) are the coordinates of the image, “
C” is the depth map, and “
∂” is the local path and
represented the under exposure.
3.1.3. Image Dehazing
The dehazing technique is used for the removal of extra color intensities and unwanted dark shading which appear after the image compliment in true colors, as shown in
Figure 5a. Using dehazing prior knowledge, hazy and dark parts from the cytoplasm of WBC images are removed to clear the nucleus and WBC’s cytoplasm region. At this stage, the WBC image is much more refined with the brightening of the dark areas in the cell region, as shown in
Figure 5b. After this process, the entire focus is on WBCs and the inner part of the cell, i.e., the nucleus, for enhancement.
The dehazing scheme used in this work [
27,
28] deals with four pre-defined steps. In the first step, image depth map estimation is performed using the local path shown in Equation (1). In the second step, the over-covered atmospheric mask on the image is removed with maximum intensity values with local maxima presented in (2), where
is the image,
is the depth map function, and
is the output image with row (
i) and column vectors
.
The third step is illustrated in Equation (3) with a transmission map “T” course and with local minima present inside the image shown in Equation (4).
where
is the atmospheric light effects, “
” is the local patch in the color image,
Gamma is constant in Equation (4),
in the dark channel of the image, and “
I” is the hazy image.
Finally, the image is restored using the image restoration model presented in Equation (5).
Further detail of this dehazing approach can be seen from [
27]. After dehazing, the image is restored to its original form by using the inverse complement function, as shown in
Figure 5b as a dehazed image. The image is then converted into grayscale, shown in
Figure 5c, and is ready to process with a virtual hexagonal trellis filter with a single stride convolution function for blood cell image enhancement.
3.1.4. The Proposed Virtual Hexagonal Filter
The proposed method is based on an image enhancement linear kernel, inspired by a square lattice Mean filter. The proposed virtual hexagonal trellis (VHT)-based filter is derived from other filters such as square- and CNN-based filters. The CNN filters are designed over conversion square trellis with nine pixels including full intensity value of neighboring pixels. Neighboring pixels impart a blurring effect over the resultant image. Here, in this approach, we designed a virtual hexagonal trellis over square trellis. The designed approach used seven pixels with a half intensity effect of neighboring pixels. This half intensity of the neighboring pixel reduces the blurring effect from the resultant image. The proposed process is effective in terms of computation cost, which is presented in later section. where the proposed VHT filter’s computational cost with square trellis base filter is compared.
The square filter, i.e., Mean filter, is generally used for image enhancement and denoising purposes. A square lattice-based Mean filter is a simple averaging filter used for denoising of images by reducing the high peak intensities of the pixels in an image. Adjusting the high peak intensity in the image improves the brightness of the image at different stages of preprocessing. A 3 × 3 shape-based Mean filter is presented in
Figure 6.
The Mean filter’s intensities are formulated in the form of classical square lattice. The filter here illustrates a 3 × 3 square grid structure. The square grid structure has nine pixels from which four immediate pixels (R1, R2, R3, and R4) are at a unit distance (
Figure 7d), whereas the other four neighboring pixels are at a unit plus distance from the central pixel. It is important to mention that, in the literature, these neighboring pixels impart a blurring effect over the central pixel during the enhancement process. Mathematical interpretation is presented to formulate a 3 × 3 filter using nine pixels shown in
Figure 7a and its square grid structure in
Figure 7b. These nine pixels consist of four neighboring and five real pixels, including the central element in Equation (6) concerning
Figure 7c. The proposed filter is inspired by this averaging shape-based 3 × 3 filter in the size presented in
Figure 7d.
The pixels’ intensities of the square grid are mapped into the square matrix for the virtual hexagonal concept to formulate virtual hexagonal trellis (VHT). This VHT structure is generated by proposing virtual pixels at half the distance between neighboring and central pixels. The real pixels R1 to R4 from the central pixels are at unity distance, whereas the neighboring pixels are at unity plus distance. Initially, the proposed averaging method is used to formulate a 3 × 3 filter kernel. The proposed method is designed over a sampled 3 × 3 square lattice presented in
Figure 8a, and a virtual pixel generation is shown in
Figure 8b.
Intensity levels in between the real pixels are not taken for partial effects over the image. The virtual pixels generated at half distances at positions v1, v2, v3, and v4 are calculated using the geometrical average distance functions. Where Vn is the virtual pixels that are at the center of neighboring pixels Nk and central Ci pixel. From the proposed work, the filter is derived from the maximum coverage of hexagonal structure in the circular intensity pixel, and max to min bounds should be defined to fine-tune the filter for maximum effective results.
The Position of v1 shown in the marked circle in
Figure 9a is calculated using the average distance of N
1 and C
1 in
Figure 9b with d
1 and d
2, respectively. Intensity to the virtual pixels V
1 is assigned using the intensity normalization averaging function [
29]. This function is often used for brightness adjustment and denoising the subjected images.
Intensities to the virtually generated pixels are assigned by averaging the intensities of central real pixels and virtual pixels in Equation (7), as presented in
Figure 10a. Central and virtual pixels used for averaging intensities are illustrated over a virtual hexagonal trellis base structure, as presented in
Figure 10b. The Hexagonal trellis-based structure in
Figure 10b is used to generate a 3 × 3 kernel, as shown in
Figure 11b, which convolutes over a dehazed grayscale image for WBC smear image enhancement.
Basic variables used to derive VHT-based kernels are presented in Equation (8).
Vi is the virtual pixels generated at half distance between two pixels that are neighboring and central. “
R” is the two real pixels at unity distance from the central “
C” pixel. Cumulative effectiveness of virtual and real pixels is averaged and replaced with the central pixel in a single stride. By simplifying the equation by substituting values of
Vi in Equation (8), we obtain
Simplifying Equation (9) by taking Lease Common Multiple (LCM). Average effects of neighboring pixels are imparted over the central pixel in a single stride.
After LCM, double factor values are assigned to real pixels and central pixels as compared to the other pixels in Equation (10).
Image enhancement filters based on virtual hexagonal trellis-based structures ignore the value of real pixels R2 and R3. By ignoring these two real pixels, the computation cost of the proposed method is reduced, and the number of pixels incorporated in the process is also reduced. Therefore, in the proposed kernel value of pixels, R2 and R3 are considered as 0 in the final shape of the VHT 3 × 3 filter. The proposed method is designed on the VHT model inspired by the Mean filter generally used for image enhancement, which reduces the amount of intensity variation between one pixel and the next. It is later used for noise reduction from the image. The filter mask, shown in
Figure 12 and designed over the VHT base structure, is convoluted over the dehazed image for enhancement.
The convolution method with a single stride length is used from left to right over the complete image. In this process, the image is enhanced using the average function for pixel intensity; moreover, the structure of the filter is refined and converted into a hexagonal lattice. Conceptually, it is an averaging filter shown in Equation (13) for image enhancement; however, it has advantages over square trellis, with fewer pixels. The proposed VHT base filter can be represented in algorithmic form in two steps. First average intensity for a newly generated virtual pixel is calculated from a sample 3 × 3 grid (as represented in Algorithm 1). In the second phase, the derived VHT filter is convolved over input images (Algorithm 2).
Algorithm 1: Virtual Pixel Generation |
1: Procedure ConvolutionVHT(Ni,j, Ci,j, Ri,j Avg )
|
2: Initializer _ Avg←0
|
3: for each Irow in IInput |
4: for each ICol in Iinput |
5: if Ni,j == neighbouring pixel and Ci+1,j+1 == central pixel |
6: than Intensityi,j = add (Ni,j, Ci+1,j+1)/
|
7: Avg ←Intensityi,j /numerOfPixelsUsed |
8: endif |
9: Avg ←Set intensity to virtual pixel
|
10: end procedure |
Algorithm 2: Convolution Operation
|
1: Procedure ConvolutionVHT(Pi,j, Ki,j, Ei,j IV )
|
2: Initializer _ variable ←IV |
3: for each Irow in IInput |
4: for each Pi,j in Prow |
5: IV ←0 |
6: for each Krow in Ki,j |
7: for each Ki,j in Krow |
8: if Ei,j ← corresponding Element of Pixel × Pi,j |
9: than multiply Ei,j X Pi,j |
10: IV ←add_results |
11: endif |
12: IV ←Set output Image pixel
|
13: end procedure |
In this proposed method, 3 × 3 kernel is used with slight ranges of variables. Averaging effect calculated from the convolution of kernel over the image is assigned to the central pixels after every stride, as shown in
Figure 13 and Equation (14).
In Equation (14), the VHT kernel in
Figure 13b is
, convoluted over source image pixels’ intensities in
Figure 13a, as presented by
, and the averaging effect is calculated. The final value after simplification of Equation (15) is 5 as an output pixel intensity
, as shown in
Figure 13c. A similar convolution strategy is adopted to process complete source image pixel values to generate processed output image pixels’ intensities through the VHT kernel.