In general, the morphological filtering process can remove
signal noise or small grains such as seeds from X-ray images
of fruit. As shown in Fig. 10a, the X-ray image of a guava contains
several infestation sites, and the result of segmentation
after adaptive thresholding without morphological filtering is
shown in Fig. 10b. By removing small spots using morphological
filtering with three iterations, small spots of noise and
granular seeds were successfully removed leaving the segmented
infestation site as shown in Fig. 10c. However, in
another case of peach as shown in Fig. 10d, the soft tissue
around the pit has similar grey level and size as the infestation
site on the top of the fruit. The morphological filtering
segmented both spots but was not successful in differentiating
the infestation site and the normal tissue (Fig. 10f). In most
cases, adjusting the iteration number of the morphological filtering can successfully segregate infestation site from the
noise or granular texture in the X-ray image of fruits. When
the size and grey level of the segmented spots are similar, the
current segmentation algorithm has its limitations and thus
other geometric features of segmented spots such as shape or
length needs to be considered, if necessary.
Another important parameter that may affect the result
of the adaptive segmentation procedure is the size of the
M×M operational sub-images. For the current configuration
of the X-ray scanning system, we most frequently used
the 32×32 operational sub-images for adaptive thresholding.
Changing the size of the operational sub-image may
lead to different results in some cases. The binary images
of guava shown in Fig. 11a and b are the results of adaptive
thresholding using different sub-image size of 32×32
and 12×12, respectively. It is clear that the sub-image size
affected the size distribution of the segmented spots. This
result subsequently affected the detection of the infestation
sites when the morphological filtering is applied. In Fig. 11c, a
shadow region corresponding to the core of the guava fruit
exists in the middle part of the X-ray image. This region,
with similar size to the infestation site, was misclassified
as an infestation site using 32×32 operational sub-images.
Using 12×12 operational sub-images in adaptive thresholding,
finer spots were obtained and the misclassified region in
Fig. 11c was screened by the morphological filter as shown in
Fig. 11d.