title: How to detect specific spots from image and crop in multiple images in python
body: <p>I am trying to detect some spots from the image and save it in multiple images after cropping. </p>
  
  <p>Image:</p>
  
  <p><a href="https://i.stack.imgur.com/h57db.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h57db.jpg" alt="enter image description here"></a></p>
  
  <p>I just want to crop wbc. </p>
  
  <p>Script: I am trying but not getting the idea.</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>My code is working but the problem is how to detect spots? as in shown in the image.</p>
  
  <p>Thanks in advance. Please suggest something</p>
  
  <p><strong>Edit-1</strong></p>
  
  <p>Error Getting</p>
  
  <pre><code>---------------------------------------------------------------------------
  ModuleNotFoundError                       Traceback (most recent call last)
  &lt;ipython-input-11-2754358a7c43&gt; in &lt;module&gt;()
  ----&gt; 1 import PyDIP as dip
        2 import PyDIP.PyDIPviewer as dv
  
  ModuleNotFoundError: No module named 'PyDIP'
  </code></pre>
  
  <p>I am trying to install PyDIP but not unbale.</p>