0

I am trying to count yeast cells using computer vision. Here is an example.

Original image

  1. I need to count all cells.
  2. I need to identify and count dead cells (blue). If a blue cells is touching another cell, regardless of colour, it is not dead.

My thinking is to process the image so that I can mask and then identify each cell. Then find the cells that are not touching, and then of those cells see which ones are dyed blue to count the dead ones.

I am still trying to process the image to get a count. I am new to python and OpenCV. I've made the image grayscale and tried to isolate the cells but I am not sure how to process further to get the cells as individual spots/blobs.

Any thoughts?


im = cv2.imread('Yeast.jpg')

im = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)

im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)

im = cv2.medianBlur(im, ksize=3)

plt.imshow(im)

Grayscale image


th, thfg = cv2.threshold(im, 100, 255,cv2.THRESH_TOZERO_INV)

fg = cv2.GaussianBlur(thfg, (3,3), 0)

plt.imshow(fg)

Threshold mask image

The other avenue I am exploring is to train an object detection model on my own labelled data, but this seems like it should be more straightforward.

0 Answers0