Activity 12: Feature Extraction

🕑12:02, 24 Oct 2019

For this activity [1], I obtained the Fruits-360 dataset from Kaggle [2] which contains thousands of labeled fruit images under the same lighting and capture settings but with varying angles. I took 50 samples each from the set of apples, oranges, and bananas.

Feature extraction: color space

I first imported the images into Python and converted them to color space. For each image, I extracted the mean values from the and channels. The channel represents a chromaticity from green to red, while the channel represents a chromaticity from blue to yellow.

Feature extraction: eccentricity

Using the same images, I applied Otsu’s method since the images contain only one fruit on a plain white background. Each fruit is then easily detected as a single large blob. I then used the regionprops function to extract the eccentricity property from each detected blob. An corresponds to a perfect circle, while an corresponds to a parabola. Values are ellipses.

Discussion

Figure 1 shows the feature space of the selected dataset in , , and . We can observe that all the classes show distinct clustering. The projections on each of the planes are shown in Fig. 2. The banana cluster shows a large variation in eccentricity but mostly resides in high-eccentricity space. This can be attributed to the various rotations of the banana images, but are still significantly elongated compared to the other fruit classes. Apples and oranges overlap in space (red and orange have very close chromaticities), but can be separated in the - space (orange is closer to yellow than red is; apples are less rounded compared to oranges). If we needed to reduce the complexity, it is sufficient to choose between either - or - feature spaces, though the former appears to maximize the class separation.

feature space

Figure 1: Feature space in , , and of apples, bananas, and oranges.

a*-b*
(a) a*-b*
a*-e
(b) a*-e
b*-e
(c) b*-e

Figure 2: Feature space projections on different planes.

References

  1. M. N. Soriano, A12 - Feature extraction (2019).
  2. H. Muresan, and M. Oltean, Fruit recognition from images using deep learning. Acta Univ. Sapientiae, Informatica 10(1), 26-42 (2018).

Keywords

image processing
computer vision
feature extraction