I want to count the number of stomata in the microscopic images of leaves. One of the samples is attached below. The stomata is characterized by oval shape in general with thick black lining in between. Since I have many images, I want to automate the process. I am familiar with Python but quite novice to computer vision.
With some code, I was able to count the number of cars in an image. However, it did not work with the image of the leaf for me. The sample code is given below:
import cv2
import numpy as np
import matplotlib.pyplot as plt
import cvlib as cv
from cvlib.object_detection import draw_bbox
from numpy.lib.polynomial import poly
image = cv2.imread("leaf1.jpg")
box, label, count = cv.detect_common_objects(image)
output = draw_bbox(image, box, label, count)
plt.imshow(output)
plt.show()
I got the results as follows with no detection of any object in the image. Is it possible to count the number of stomata in the leaf images as these?


