-- **Adam Hughes (hugadams@gwmail.gwu.edu)**
-- **3/21/14**
-- **The George Washington University**
Nanotechnology and image processing are two of the most rapidly growing interdisciplinary research fields. Gold nanoparticles have recently appeared in novel applications ranging from photovoltaics[1], to protein sensing[2], and even to boiling water[3]. Likewise, fascinating applications of image processing, for example in areas like computer vision, ensure vested interest from academic and commercial organizations for the foreseeable future.
High-resolution microscopy (HRM) is the keystone between nanotech and image processing. This is not surprising, since small variations in nanoparticle morphology, both at the individual particle and ensemble scale, drastically affect the macroscopic properties of the composite. One would expect to find a considerable body of knowledge and software geared towards HRM nanomaterial processing; however, this is not the case. Despite similar requirements in image acquisition and processing, fields like cell profiling[4] vastly overshadow nanotech. HRM in terms of knowledge base and dedicated software. Using scientific Python, especially Scikit-image, we have begun addressing this disparity.
We sought to create a guide for nanomaterial image processing, but didn't want to make biased assessments based on our experimental images. Using Scikit-image and a complementary particle analysis library, PyParty, we set out to build artificial electron microscope images. We could then compare the performance of preprocessing and segmentation algorithms in the context of nanoscience, and begin to assemble targeted workflows. The chosen image features particles of varying multiplicity, brightness and orientation, patterned over a shadowed background. Realistic particle edges were obtained with Gaussian smoothing, and normal noise was generated in Numpy. We have already successfully used these images in several endeavors, from assessing the performance of new supervised object classification tools[5], to building predictive models for nanoparticle-ligand binding on rough thin films. These images are available for public use, and we hope they will be repurposed many times.
NBCONFIG.ipynb sets a custom IPython stylesheet and tweaks matplotlib settings. The %run magic used below **requires IPython 2.0 or higher.** These have not been included in the submission.
In [23]:
%run NBCONFIG.ipynb
I decided to import some images rather than regenerating them with my submission because they are computationally intensive and verbose. All of the original work to generate this images is available as source or static render. All of the work generating the artifical data used scipy libraries and pyparty ONLY. This notebook organizes the results of that notebook into an informative collage. A much simpler example of the image construction process is available in this simple exercise.
All of our artificially-generated images are available in this repo; please follow the directions there for redistribution and referencing.
As a first step, I define a function to read an image from the Images directory, and optionally rescale its aspect ratio (by $\frac{6}{10}$) to better fit on the matplotlib gridded subplot.
In [24]:
from skimage import io
from pyparty.utils import crop
def READ(basename, crop_aspect=False):
""" Return opened image from Images directory"""
img = io.imread('Images/%s' % basename)
if crop_aspect:
l, w = img.shape[0:2]
img = crop(img, coords=(0,0, l, w*.6))
return img
Submitted below is the artificial (3072x2304) nanoparticle image, accompanied by a grayscale histogram, decomposed into the various image components of noise, background, and separated particle species (dimers, trimers etc..). Four additional subplots show, in clockwise order:
In [25]:
import matplotlib.gridspec as gridspec
# Layout of 6 gridded subplots
gs = gridspec.GridSpec(4, 4)
ax1 = plt.subplot(gs[:, :2])
ax2 = plt.subplot(gs[:2, 2:])
ax3 = plt.subplot(gs[2, 2])
ax4 = plt.subplot(gs[2, 3])
ax5 = plt.subplot(gs[3, 2])
ax6 = plt.subplot(gs[3, 3])
# Set axis labels main image
ax1.set_xlabel('px')
ax1.set_ylabel('px')
# Remove axis labels remaining plots
ax_all_but_hist = [ax2, ax3, ax4, ax5, ax6]
for ax in ax_all_but_hist:
ax.yaxis.set_visible(False)
ax.xaxis.set_visible(False)
ax2.yaxis.set_visible(False)
# Main image
ax1.imshow(READ('SEM_test_noise.png'))
ax1.set_title('Artifical SEM Nanoparticle Image')
# Grayscale Histogram (xlabels set manually)
ax2.imshow(READ('hist.png'))
ax2.set_title("Grayscale Distribution (80-255 px)")
ax2.set_xticklabels(np.linspace(80,255,8).astype(int))
# Color-labeled particles
ax3.imshow(READ('labeled.png', crop_aspect=True))
# Background (Sans particles / Sans Noise)
ax4.imshow(READ('bgsans.png', crop_aspect=True))
# Particle edges with false color
ax5.imshow(READ('particle_edges.png', crop_aspect=True), cmap=plt.cm.afmhot)
# Noise: zoomed in to 50 x 30 pixels
NOISE = crop(READ('noise.png'), coords=(0,0,50, 30))
ax6.imshow(NOISE);
[1] Shiva Shahin, Palash Gangopadhyay, and Robert a. Norwood. Ultrathin organic bulk heterojunction solar cells: Plasmon enhanced performance using Au nanoparticles. Applied Physics Letters, 101(5):053109, 2012.
[2] V V R Sai, Tapanendu Kundu, and Soumyo Mukherji. Novel U-bent fiber optic probe for localized surface plasmon resonance based biosensor. Biosensors & bioelectronics, 24(9):2804–9, May 2009.
[3] Phil McKenna. Nanoparticles Make Steam without Bringing Water to a Boil. MIT Technology Review, 2012.
[4] Kamentsky L, Jones TR, Fraser A, Bray M, Logan D, Madden K, Ljosa V, Rueden C, Harris GB, Eliceiri K, Carpenter AE (2011) Improved structure, function, and compatibility for CellProfiler: modular high-throughput image analysis software. Bioinformatics 2011/doi. PMID: 21349861 PMCID: PMC3072555
[5] C. Sommer, C. Straehle, U. Köthe, and F.A. Hamprecht. 8th IEEE International Symposium on Biomedical Imaging (ISBI 2011), in press