Is there anyway I could measure these cells in eye scan?

67 views Asked by At

I want to measure these white cells I in this eye scan

Image

Is there any suggestions or comments you may have that could help me measure cell counts? I am using Matlab, Fiji, and python for image processing!

1

There are 1 answers

0
arrmansa On

You could try https://photutils.readthedocs.io/en/stable/detection.html#local-peak-detection, and separating the image into smaller parts.

You could probably change the parameters and use skimage segmenting for a better output, but I just used the dim top half as a sample.

sample

import cv2
import matplotlib.pyplot as plt
from photutils.detection import find_peaks

data = cv2.imread("iwZJT.jpg", 0)/255
data = data[:data.shape[0]//2, :] # to cut the image in half


mean, median, std = sigma_clipped_stats(data, sigma=3.0)
threshold = median + (1.5 * std)
tbl = find_peaks(data, threshold, box_size=11)
tbl['peak_value'].info.format = '%.8g'  # for consistent table output
print(tbl[:10])  # print only the first 10 peaks

plt.imshow(data)
plt.scatter(tbl["x_peak"], tbl["y_peak"], color="r")
plt.show()

enter image description here