You are on page 1of 25

Image Analysis Using R

Chris Campbell

LondonR - 13th July 2010

Steps to image analysis


Image capture
Clean image/reduce noise Extract information Analyze information

Image Capture
Photography
Light Light microscopy Fluorescence microscopy

gels
cells tissue samples

http:// ... western blot http:// ... cells

Image Capture
Photography
Light Light microscopy Fluorescence microscopy Radiography X-ray Computed tomography (CT) tumours

gels
cells tissue samples bones

http:// ... x-ray http:// ... cat scan

Image Capture
Photography
Light Light microscopy Fluorescence microscopy Radiography X-ray Computed tomography Magnetism Magnetic resonance imaging (MRI) tumours patients

gels
cells tissue samples bones

http:// ... MRI

Image Capture
Photography
Light Light microscopy Fluorescence microscopy Radiography X-ray Computed tomography Magnetism Electrons Magnetic resonance imaging Scanning electron microscopy tumours patients insects

gels
cells tissue samples bones

Transmission electron microscopy

viruses

http:// ... SEM insect http:// ... TEM virus

Image Capture
Photography
Light Light microscopy Fluorescence microscopy Radiography X-ray Computed tomography Magnetism Electrons Magnetic resonance imaging Scanning electron microscopy tumours patients insects

gels
cells tissue samples bones

Transmission electron microscopy Positrons


Positron emission tomography (PET)
http:// ... positron emission tomography

viruses
tumours

Image Capture
Photography
Light Light microscopy Fluorescence microscopy Radiography X-ray Computed tomography Magnetism Electrons Magnetic resonance imaging Scanning electron microscopy tumours patients insects

gels
cells tissue samples bones

Transmission electron microscopy Positrons


Intermolecular forces Positron emission tomography (PET)

viruses
tumours

Atomic force microscopy inorganic surfaces http://pico.iis.u-tokyo.ac.jp/media/16/20060621-QuenchedSi-AFM.jpg

Generally
Use large numbers of images
Use all images Use whole image, not crop

Random selection not "typical region"


i.e. avoid subjectivity

Image Processing Libraries in CRAN


biOps dcemri dpmixsim edci epsi FITSio PET R4dfp rimage RImageJ ripa tractor.base adimpro Image processing and analysis A Package for Medical Image Analysis Dirichlet Process Mixture model simulation for clustering & image segmentation Edge Detection and Clustering in Images Edge Preserving Smoothing for Images FITS (Flexible Image Transport System) utilities Simulation and Reconstruction of PET Images 4dfp MRI Image Read & Write Routines Image Processing Module for R R bindings for ImageJ R Image Processing & Analysis A package for reading, manipulating & visualising magnetic resonance images Adaptive Smoothing of Digital Images

Libraries in CRAN
biOps dcemri dpmixsim edci epsi FITSio PET R4dfp rimage RImageJ ripa tractor.base adimpro Image processing and analysis A Package for Medical Image Analysis Dirichlet Process Mixture model simulation for clustering & image segmentation Edge Detection and Clustering in Images Edge Preserving Smoothing for Images FITS (Flexible Image Transport System) utilities Simulation and Reconstruction of PET Images 4dfp MRI Image Read & Write Routines Image Processing Module for R R bindings for ImageJ R Image Processing & Analysis A package for reading, manipulating & visualising magnetic resonance images Adaptive Smoothing of Digital Images

package:RImageJ
Authors: Romain Francois & Philippe Grosjean
Bindings between R and ImageJ

Open source Java Image analysis software http://rsbweb.nih.gov/ij/

Subjectivity vs. Objectivity


Hypothesis: blue blobs are always larger than yellow blobs

Subjectivity
Hypothesis: blue blobs are always larger than yellow blobs

Manual measurements

Subjectivity
Hypothesis: blue blobs are always larger than yellow blobs

Its easy to accept manual measurements when they make sense, but its tempting to repeat them if they seem wrong

Subjectivity
Hypothesis: blue blobs are always larger than yellow blobs

Subjective observer accepts expected hypothesis

Objectivity
Hypothesis: blue blobs are always larger than yellow blobs

Automatically threshold

Objectivity
Hypothesis: blue blobs are always larger than yellow blobs

Objective observer automates analysis and rejects hypothesis

Automate Procedures
Identify objects without making subjective decisions

Run ImageJ from R


Open connection to an image
Use IJ$run() to access macros Great potential for automating image processing from R

Run ImageJ from R


However, some key macros not yet implemented (e.g. setAutoThreshold, imageCalculator)

package:rimage
Author: Nikon
Reads jpegs into RGB arrays Plot function defined for objects of class "imagematrix"

Analyze information
Plots and statistical summaries of particles from image

Single image

Multiple images

Conclusions
Images available?
Ensure quality/validate method Choose useful measures Use analysis to make predictions

Acknowledgements
Mango Solutions www.mango-solutions.com
L. R. Contreras-Rojas, R. H. Guy http://www.bath.ac.uk/pharmacy/staff/rhg.html NAPOLEON http://www.ehu.es/napoleon/

You might also like