Advertisement
Guest User

Untitled

a guest
May 1st, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. from skimage import io, color
  2. from skimage.filters.rank import median
  3. from skimage.feature import blob_dog, blob_log, blob_doh
  4. from skimage.morphology import disk
  5. from matplotlib import pyplot as plt
  6.  
  7.  
  8. img = io.imread('RawImage.tif')
  9. img_gray = color.rgb2gray(img)
  10. img_filtered = median(img_gray, disk(10))
  11.  
  12. plt.figure()
  13. plt.imshow(img_filtered, cmap='gray')
  14. plt.title('Filtered Image')
  15.  
  16. blobs = blob_doh(img_filtered)
  17.  
  18. for blob in blobs:
  19. y, x, r = blob
  20. c = plt.Circle((x, y), r, color='red', linewidth=2, fill=False)
  21. plt.gca().add_patch(c)
  22.  
  23. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement