Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from skimage import io, color
- from skimage.filters.rank import median
- from skimage.feature import blob_dog, blob_log, blob_doh
- from skimage.morphology import disk
- from matplotlib import pyplot as plt
- img = io.imread('RawImage.tif')
- img_gray = color.rgb2gray(img)
- img_filtered = median(img_gray, disk(10))
- plt.figure()
- plt.imshow(img_filtered, cmap='gray')
- plt.title('Filtered Image')
- blobs = blob_doh(img_filtered)
- for blob in blobs:
- y, x, r = blob
- c = plt.Circle((x, y), r, color='red', linewidth=2, fill=False)
- plt.gca().add_patch(c)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement