from images to answers - mcgill university · june 2008 mcgill university image processing workshop...

40
June 2008 McGill University Image Processing Workshop presented by Media Cybernetics © www.mediacy.com June 2008 McGill University Image Processing Workshop presented by Media Cybernetics © www.mediacy.com An Introduction to Image Processing presented by Nick Beavers Applications Specialist Media Cybernetics From Images to Answers

Upload: others

Post on 15-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.comJune 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

An Introduction to Image Processing presented by

Nick BeaversApplications Specialist

Media Cybernetics

From Images

to Answers

Page 2: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

What is an image?

An image is a numerical representation of a “picture”

– a set of numbers interpreted by the computer which creates a visual

representation that is understood by humans.

255 255 199143 97 18732 12 3423 22 11

244 198 179123 94 19532 43 5213 32 11

253 217 23468 185 9713 12 2711 14 26

Page 3: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Pixels are identified by their position in a grid (two-dimensional array), referenced by its row (x), and column (y).

Image: Pixel Array

Pixel= Picture Element

Page 4: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Binary Digits (bits)

Bitonal

0 = Black1 = White

Page 5: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• BIT DEPTH is determined by the number of bits used to define each pixel. The greater the bit depth, the greater the number of tones (grayscale or color) that can be represented

What is bit-depth?

Page 6: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Bits Tones Binary Digits Array

1 bit (21) 2 tones

(0 – 1)

0 or 1

2 bits (22) 4 tones

(0 – 3)

00, 01, 10, 11

3 bits (23) 8 tones

(0 – 7)

000, 001, 010, 011, 100, 101, 110, 111

4 bits (24) 16 tones

(0 – 15)

0000, 0001, 0010, 0100, 1000, 0011, 0101, 1001, 1010, 0111,1011, 1100, 1101, 1110, 1111, 0110

Page 7: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Bits Tones Binary Digits Array

8 bit (28) 256 tones

(0 – 255)

00000000, 00000001, etc.

12 bits (212) 4,096 tones

(0 – 4,095)

000000000000, 000000000001,etc.

16 bits (216) 65,536 tones

(0 – 65,535)

0000000000000000, 0000000000000001, etc.

24 bits (224) 16.7 million tones

(0 – 16,699,999)

000000000000000000000000, 000000000000000000000001, etc.

Page 8: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

The number of pixels in the image must be sufficient to distinguish features of interest:

Resolution

Page 9: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Aliasing: Distortion introduced when an image of high resolution is sampled by a detector of lower resolution.

Resolution

Page 10: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

1x1

0.108 mm/pixel

2x2

0.216 mm/pixel

3x3

0.324 mm/pixel

4x4

0.432 mm/pixel

Same display settings

Different contrast and brightness

Images courtesy of Claire M. Brown, PhD, McGill University Department of Biochemistry

Binning

Page 11: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Zoom 1

0.140 mm/pixel

Zoom 3

0.047 mm/pixel

Zoom 6

0.023 mm/pixel

Zoom 8

0.017 mm/pixel

Zoom 10

0.014 mm/pixel

63X NA 1.4 Oil

Images courtesy of Claire M. Brown, PhD, McGill University Department of Biochemistry

Distance (mm)

0.0 0.5 1.0 1.5 2.0

Inte

nsity

0

200

400

600

800

1000

1200

1400

1600

1800

Zoom 1

Zoom 3

Zoom 6

Zoom 8

Zoom 10

Over Sampling

Page 12: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• Input device – the source of the images; camera, microscope, scanner, etc

• Interface hardware – the connection between the input device and the computer; takes the input signal and digitizes it for use on a PC

• Imaging software – the user interface to all the imaging components

• Output devices – printers, image storage devices, monitors

What components are involved in imaging?

Page 13: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• Capture only or “driver” software: software used to capture and save an image from a device – developed mostly by hardware manufacturers

Example: TWAIN drivers

• “Imaging” software, Image Editing, Photo Retouching: software used primarily in home and general business applications, mostly consumer oriented

Example: Adobe PhotoShop, Microsoft Photo Editor, Image Tools

• Basic Image Measurement Software: used for basic image capture, enhancement, with simple measuring tools

Example: Image-Pro Express

• General Analytical Image Analysis Software: used in scientific/industrial analysis of images to generate proven data

Example: Image-Pro Plus

• Vertical Market Image Analysis Software: used to solve specific imaging problems in a related industry

Example: Array-Pro, Scope-Pro, Materials-Pro Analyzer, or vision software libraries

Types of Imaging Software

Page 14: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• Sample Preparation*

• Acquisition – how do we acquire an image into the computer?

• Enhancement – how do we make it look better to extract information?

• Identification – which attributes of the image are we interested in?

• Measurement – what information can we obtain?

• Report Generation – how can we present this information?

• Archive – how can we store the information?

The Analytical Imaging Process

Page 15: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

There are basic ways to enhance an image:

• Modify its intensity index: brightness, contrast, gamma

• Background correction: flatten, compensate for irregularities

• Apply a spatial filter or operation: sharpen, low-pass, edge

Advanced enhancement

• Manipulate the image frequencies: Fourier transform

• Morphological transformations: erode, dilate, both…

Image Enhancement

Page 16: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Low dynamic

range

Medium

contrast0 72.8571 182.143

0

10000

20000

30000

Full dynamic

range

Good contrast

0 72.8571 182.143

0

10000

20000

30000

Enhancement: Grey-value Histogram Stretch

Page 17: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

brightness contrast All Threelinear gamma 0.5gamma 2

Image Intensity

Dis

pla

y In

tensi

ty

Images courtesy of Claire M. Brown, PhD, McGill University Department of Biochemistry

Image Enhancement: All Three

Page 18: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Background Automatic flatten of Background

Original

Image Enhancement: Background Correction

Page 19: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Commonly used convolution filters:

• Low-pass: blurs, or smoothes an object

• Sharpen: enhances all intensity transitions

• Hi-pass: creates harsh intensity variations

• Median: removes random impulse noise

Advanced Filters:

• Sigma: removes local impulse noise without

Image Enhancement: Spatial Filtering

Page 20: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Kernel size

Preview window

Filter description

Sharpen Filter

Page 21: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Examples

Image Enhancement: Sharpening

Page 22: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

DAPI

Cy3

FITC

Processing / EnhancementMerge Images

Page 23: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Red

Green

Blue

Processing / EnhancementExtract Images

Page 24: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Extended Depth of Field

Page 25: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

“Stitching” of

Images

through

Automatic

Microscope

and Stage

control

Tiling

Page 26: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• Thresholding techniques – Identify objects, based on

intensity variations from background or other objects of

non-interest

•Grayscale

•Color

• Area of Interest (AOI) – manually defining regions of

interest

Identification

Page 27: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Thresholding / Segmentation

Page 28: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• Object splitting – using filters, or manually splitting by drawing lines between touching objects.

• Guard frame – when working on multiple fields side by side, we may need to specify that object touching the borders of the image.

• Pseudo-color – adds false color to the image to show changes in gray values not noticeable to the human eye.

Pre Measurement Steps

Page 29: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• Size (area, perimeter, length, etc)

• Shape (roundness, aspect ratio)

• Density / IOD

• Clusters

• Fractal Dimension

• Uniformity

Once objects are identified, we are

dealing then with a set of pixels,

which are a set of numbers and

thus we are able to measure

anything as needed

Measurement Parameters

Page 30: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Statistical Measurement of Objects

Page 31: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Line Profile

Page 32: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• Horizontal section

• Vertical section

• Curved section

Thickness Measurements

Page 33: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Area Percentage Measurements

Page 34: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Colocalization

Intensities in Time-Series

Fluorescence Measurements

Page 35: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

• DDE data to Excel for further statistical analysis

• Create reports – single sheet with image, data, charts using a custom template creating a unified and consistent report mechanism for use department wide

• Data Collector – collection of analysis data from multiple images into a single space – which can then be used to DDE, or create reports

• Poster Printing – allows for taking a single image and printing it on multiple sheets of paper for presentation/poster sessions

• Annotation – all measurements can be placed onto the image as a layer so it does not interfere with future needs for analysis

Data Output

Page 36: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Data Output

Page 37: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Original measured image Objects sorted by e.g. area

Sort Object in Gallery

Page 38: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Volume rendering

Real Time Interaction

Clipping

Surface rendering

Volume of Interest

Three Dimensional Reconstruction

Page 39: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.comJune 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

Thank You!

Nick BeaversApplications Specialist

Media Cybernetics

From Images

to Answers

Page 40: From Images to Answers - McGill University · June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© • DDE data to Excel for further statistical

June 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.comJune 2008 McGill University Image Processing Workshop presented by Media Cybernetics© www.mediacy.com

For more information or demo copies please contact:

[email protected]

For information on Image-Pro Plus and AutoQuant software please visit:

www.mediacy.com

From Images

to Answers