I am trying to detect some spots from the image and save it in multiple images after cropping.
Image:
I just want to crop wbc.
Script: I am trying but not getting the idea.
import cv2
import numpy as np;
# Read image
im = cv2.imread("C:/Users/Desktop/MedPrime_Tech_Work/tag-145218-Default-10X.jpg", cv2.IMREAD_GRAYSCALE)
# Set up the detector with default parameters.
detector = cv2.SimpleBlobDetector_create()
# Detect blobs.
keypoints = detector.detect(im)
print (keypoints)
# Draw detected blobs as red circles.
# cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS ensures the size of the circle corresponds to the size of blob
im_with_keypoints = cv2.drawKeypoints(im, keypoints, np.array([]), (0,0,255), cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
# Show keypoints
cv2.imshow("Keypoints", im_with_keypoints)
cv2.waitKey(0)
My code is working but the problem is how to detect spots? as in shown in the image.
Thanks in advance. Please suggest something
Edit-1
Error Getting
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-11-2754358a7c43> in <module>()
----> 1 import PyDIP as dip
2 import PyDIP.PyDIPviewer as dv
ModuleNotFoundError: No module named 'PyDIP'
I am trying to install PyDIP but not unbale.