I'm relatively new to OpenCV and I do not have a strong image processing background. Currently I am working on a project to write a program to count all the biological cells from microscope in an image. I have tried various method from Internet sources to apply counting on the image, but none of them work well as expected.
Some of the methods I have used are:
This is an example of the image I need to count the total number of cells.
My current counting algorithm works better if the cells are not close together. For example like this:
However, the algorithm still fail to split apart the 3 cells that are sticked together in the center of the image.
So what could I do to detect total number of cells in an image with least false negative/positive?
Your approach is almost fine. However, it needs some additional steps. You need something called Morphological Operations.
Opening:
cv::Mat element = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(5, 5), cv::Point(1, 1));
cv::morphologyEx(img, img, cv::MORPH_OPEN, element, cv::Point(-1, -1), 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With