Created
May 2, 2016 01:20
-
-
Save vighneshbirodkar/c16515126e648cf92f08d3319d3a023e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment