blob detection and dust removal
Raphael
raphael at aims.ac.za
Sat Apr 30 02:02:50 EDT 2016
hi folks,
Got a problem removing dust and identifying blobs/crytals. Kindly see my
code below
from __future__ import division, print_function
import matplotlib.pyplot as plt
import numpy as np
from skimage import io, feature, color, measure, draw, img_as_float,
exposure
from skimage.filters.rank import median
from skimage.feature import blob_dog, blob_log, blob_doh
from skimage.morphology import disk
#raw image
image_raw =
img_as_float((io.imread('/home/raphael/Documents/ScikitImage/Run
4-2_00061cropped.tif'))) (RawImage.tif attached)
plt.imshow(image_raw)
#converted to grayscale
img_gray =
color.rgb2gray(io.imread('/home/raphael/Documents/ScikitImage/Run
4-2_00061cropped.tif'))
plt.imshow(image_gray)
#applied median filter to take out small dust particles. But the big dust
particle on the top right corner still persists (see median1.png attached)
img_filtered=median(img_gray,disk(10))
plt.imshow(img_filtered)
#applied adapthist to make image more clearer (see adaptive.png)
img_equalized=exposure.equalize_adapthist(img_filtered)
plt.imshow(img_equalized)
#trying to detect the crystals/blobs. I followed the example here
http://scikit-image.org/docs/dev/auto_examples/features_detection/plot_blob.html
But this gave an error. matplotlib was not happy with the data type
blobs_doh = blob_doh(img_equalized, max_sigma=30, threshold=.1)
plt.imshow(blobs_doh)
My problems are:
1. I could not get the dust particle out especially the really big one on
the top right. How can I get it out?
2. I could not detect the crystals/blobs in the image using blob_doh
Any ideas/suggestions is highly appreciated. Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160429/f4c38b2e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: median1.png
Type: image/png
Size: 76710 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160429/f4c38b2e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Adaptive.png
Type: image/png
Size: 96303 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160429/f4c38b2e/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RawImage.tif
Type: image/tiff
Size: 531764 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20160429/f4c38b2e/attachment.tif>
More information about the scikit-image
mailing list