Figure 6: Converting the RGB images to grayscale.