1 Getting started

EBImage is an R package distributed as part of the Bioconductor project. To install the package, start R and enter:

source("http://bioconductor.org/biocLite.R")
biocLite("EBImage")

Once EBImage is installed, it can be loaded by the following command.

library("EBImage")

2 Reading, displaying and writing images

Basic EBImage functionality includes reading, writing, and displaying of images. Images are read using the function readImage, which takes as input a file name or an URL. To start off, let us load a sample picture distributed with the package.

f = system.file("images", "sample.png", package="EBImage")
img = readImage(f)

EBImage currently supports three image file formats: jpeg, png and tiff. This list is complemented by the RBioFormats package providing support for a much wider range of file formats including proprietary microscopy image data and metadata.

The image which we just loaded can be visualized by the function display.

display(img)