April 15, 2020 - Looking at more Images using New Color Segmentation Method

Lab Work

Today, I used the color thresholds found in my last post for female gonad identification on a few more images to see the overall best color space to use in order to segment these images via color segmentation. In order to find the most accurate color space in an unbiased way, I used a random number generator to pick out 10 random images to segment. The numbers that were chosen were 153, 77, 10, 27, 94, 38, 154, 134, 179, 104. These numbers were then associated to the sample number of each image. The segmented results are shown below:

image: 20180924-angasi179-10x-scale

original

angasi179-10x-scale

BGR

angasi179_bgr.png

HSV

angasi179_hsv.png

YCrCb

angasi179_ycrcb

Lab

angasi179_lab.png

image: 20180924-angasi154-10x-tiled-scale

original

angasi154-10x-tiled-scale

BGR

angasi154_bgr

HSV

angasi154_hsv

YCrCb

angasi154_ycrcb

Lab

angasi154_lab

image: 20180924-angasi134-10x

original

angasi134-10x.jpg

BGR

angasi134_bgr.png

HSV

angasi134_hsv

YCrCb

angasi134_ycrcb

Lab

angasi134_lab

image: 20180924-angasi153-10x-tiled-scale

original

angasi153-10x-tiled-scale

BGR

angasi153_bgr

HSV

angasi153_hsv.png

YCrCb

angasi153_ycrcb.png

Lab

angasi153_lab.png

image: 20180924-angasi104-10x-tiled

original

angasi104-10x-tiled

BGR

angasi104_bgr.png

HSV

angasi104_hsv.png

YCrCb

angasi104_ycrcb.png

Lab

angasi104_lab.png

image: 20180924-angasi094-10x-tiled

original

angasi094-10x-tiled

BGR

angasi94_bgr.png

HSV

angasi94_hsv.png

YCrCb

angasi94_ycrcb

Lab

angasi94_lab.png

image: 20180924-angasi077-10x-tiled

original

angasi077-10x-tiled

BGR

angasi77_bgr

HSV

angasi77_hsv

YCrCb

angasi77_ycrcb

Lab

angasi77_lab

image: 20180924-angasi038-10x-tiled

original

angasi038-10x-tiled.jpg

BGR

angasi38_bgr.png

HSV

angasi38_hsv

YCrCb

angasi38_ycrcb

Lab

angasi38_lab

image: 20180924-angasi027-10x-tiled

original

angasi027-10x-tiled.jpg

BGR

angasi27_bgr

HSV

angasi27_hsv

YCrCb

angasi27_ycrcb

Lab

angasi27_lab

image: 20180924-angasi010-40x-tiled

original

angasi010-40x-tiled.jpg

BGR

angasi10_bgr.png

HSV

angasi10_hsv.png

YCrCb

angasi10_ycrcb.png

Lab

angasi10_lab.png

After segmenting those images, I thought it would be helpful to also see how well the color segmentations were for male gonad identification as well. So, I looked at the density plots that were made for male gonad identification and these were the resulting thresholds that I produced for all 4 color spaces:

BGR: min = [55, 0, 60] & max = [180, 115, 225]

HSV: min = [90, 15, 75] & max = [170, 250, 225]

YCrCb: min = [25, 115, 125] & max = [130, 225, 180]

Lab: min = [30, 120, 75] & max = [140, 210, 140]

Using these threshold values, these segmented images were produced:

image: 20180924-angasi179-10x-scale

BGR

angasi179s_bgr.png

HSV

angasi179s_hsv

YCrCb

angasi179s_ycrcb

Lab

angasi179s_lab

image: 20180924-angasi094-10x-tiled

BGR

angasi94s_bgr.png

HSV

angasi94s_hsv.png

YCrCb

angasi94s_ycrcb.png

Lab

angasi94s_lab.png

As is probably apparent, it seems like the color thresholds were not as accurate for the male gonad as it was for identifying the presence of female gonad, and thus, I tried to screenshot each sperm cell that was present in an image rather than a cluster of sperm cells, which produced this combined image:

final_image_s_new

Using this new image, I found new color thresholds for the color spaces that were very different from the original color thresholds found:

BGR: min = [50, 0, 65] & max = [155, 50, 165]

HSV: min = [140, 130, 60] & max = [165, 250, 170]

YCrCb: min = [25,145,130] & max = [75,200,180]

Lab: min = [35, 155, 65] & max = [100, 195, 130]

I then tried to segment one image as a test, and the results were much better than what was originally produced:

image: 20180924-angasi094-10x-tiled

BGR

angasi94snew_bgr

HSV

angasi94snew_hsv

YCrCb

angasi94snew_ycrcb.png

Lab

angasi94snew_lab.png


Next Steps

Analyze which color space is best to segment both male and female gonad in images

Written on April 15, 2020