In activity 10 we have successfully specified our Region of Interest (ROI) by morphological operations and filtering out regions with certain area measurement. For this activity, we will again be dealing with specifying ROI, only this time we will be using the color of the ROI to do so.

We begin by finding an image of an object with roughly monochromatic color. Figure 1 shows the image that I will be processing for this activity.

Figure 1. Image to be processed

A monochromatic region was then cropped. I chose 3 different regions – one from the bright side, one from the dark side, and one from the middle – for comparison. These regions are shown in figures 2-A, 2-B, and 2-C respectively.

Figure 2-A ROI 1

Figure 2- B ROI 2

Figure 2- C. ROI 3

A 2D histogram of the ROIs were obtained for the non-parametric segmentation. It was also used to check if my code is working as it was supposed to. By comparing the histogram to the RG chromaticity diagram provided I can check if I’m getting the right histogram. A sample comparison can be seen in figure 3. For a clear comparison I used a colormap to plot the histogram of the ROI instead of the usual 2D plots. I then superimposed a semi-translucent chromaticity diagram in the colormap. The light pixels, encircled in the figure, indicate the points where the histogram has a high value. It can be clearly seen that these pixels coincide with the cyan-ish region of the given diagram which is the color of the ROI.

Figure 3. Histogram of sample ROI (colormap) superimposed with RG Chromaticity Diagram

Image processed using Parametric (left) and Non-parametric (right) Segmentation using the ROI 1

Image processed using Parametric (left) and Non-parametric (right) Segmentation using ROI 2

Image processed using Parametric (left) and Non-parametric (right) Segmentation using ROI 3

It can be noticed that when the ROI was cropped from the dark side the resulting image showed less of the bright side while the opposite happened when theROI was cropped from the bright side. Getting the ROI from the middle resulted to an image that is closest to the original image. This mean s that the middle area represents more of the colors in the desired image than the other two ROIs. Comparing the results of Parametric and Non-parametric segmentation we could see that the parametric one resulted to a cleaner image with more defined edges. The star shape which is the desired region was more clearly separated from the background using parametric segmentation. However, the non-parametric segmentation resulted to a more detailed image. Compared to that of the parametric, the details inside the ROI (which are not part of the ROI) are more defined in non-parametric segmentation. Overall, I would say that Parametric segmentation yields better results however, it depends largely on the desired application.

I would like to thank Jonats for sharing his insights

Grade: 9/10

— to be continued