Removal of background pixels is necessary before the adaptive
thresholding algorithm is applied to the X-ray images of
fruits. This is because the random noise in the background region is suitable for global thresholding instead of adaptive
thresholding, since the pixel values in the background regions
are not affected by the thickness or density of the fruit. These
pixel values mainly represent the blank background and signal noise during image acquisition. Undesirable results will
occur if the adaptive thresholding is applied to the noise pixels.
By examining the histogram of a typical X-ray image (see
Fig. 6),