mipr lecture 5 copyright oleh tretiak, 2004 1 medical imaging and pattern recognition lecture 5...

30
MIPR Lecture 5 Copyright Oleh Tretiak, 2004 1 Medical Imaging and Pattern Recognition Lecture 5 Image Measurements and Operations Oleh Tretiak

Post on 19-Dec-2015

216 views

Category:

Documents


3 download

TRANSCRIPT

MIPR Lecture 5Copyright Oleh Tretiak, 2004

1

Medical Imaging and Pattern Recognition

Lecture 5 Image Measurements and

OperationsOleh Tretiak

MIPR Lecture 5Copyright Oleh Tretiak, 2004

2

Previous Lectures

• Images represent objects. We wish to see or measure items in images.

• Image quality is affected by resolution and sampling.

• Image quality is affected by noise.• Images are stored in files, and are

displayed with pixels. They have grey scale.

MIPR Lecture 5Copyright Oleh Tretiak, 2004

3

This Lecture

• Image enhancement– Seeing more in images

• Image measurement– Data from images

MIPR Lecture 5Copyright Oleh Tretiak, 2004

4

Image Enhancement

• Contrast operations• Image scaling, rotation• Filtering

– Noise reduction– Edge enhancement

• Image subtraction• Image addition• Image stacks

MIPR Lecture 5Copyright Oleh Tretiak, 2004

5

Contrast Operations

• I(x,y) - initial image; O(x,y) - output image;• At each x,y point:

O(x, y) = cI(x,y)+b

c ~ contrast, b ~ brightness

I(x, y) O(x, y)

MIPR Lecture 5Copyright Oleh Tretiak, 2004

6

Histogram

• I(x, y) image, 0≤I(x,y)≤k integer values only• H(j), 0≤j≤k histogram of image I. • H(j) = number of pixels for which I(x, y) = j

MIPR Lecture 5Copyright Oleh Tretiak, 2004

7

Contrast Control Features

ImageJ Brightness & Contrast Control

“Historgram Equalization”An automatic contrast adjustment method.

MIPR Lecture 5Copyright Oleh Tretiak, 2004

8

Image Scaling, Rotation, Cropping

Original, 128x128

Rotate by 15°

Scale by 2,256x256

Scale by 0.5, 64x64,less information.

MIPR Lecture 5Copyright Oleh Tretiak, 2004

9

What is Image Filtering?

• Compute new image from old image• Each pixel in new image depends on ‘nearby’ pixels in

old image• For all x, y

O(x, y) = F(I(x, y), I(x+1, y), I(x-1, y), I(x, y+1), I(x, y-1))

x

y

x

y

I(x, y) O(x, y)

MIPR Lecture 5Copyright Oleh Tretiak, 2004

10

Examples-Formulas

• Examples – O(x, y) = {I(x, y)+I(x+1, y)+I(x-1, y)+I(x, y+1)+I(x, y-1)}/5

• local average– O(x, y) = {4I(x, y)-I(x+1, y)-I(x-1, y)-I(x, y+1)-I(x, y-1)}

• Laplacian– O(x, y) = {I2(x, y)+I2(x+1, y)+I2(x-1, y)+I2(x, y+1)

+I2(x, y-1)}/5• Quadratic (nonlinear)

• Output depends on neighboring pixels of the input function

• Neighborhood can be small or large

MIPR Lecture 5Copyright Oleh Tretiak, 2004

11

Linear Low-Pass Filter

• Use: Noise reduction– ImageJ function Process->Smooth

MIPR Lecture 5Copyright Oleh Tretiak, 2004

12

Median Filter

• Use: Noise reduction– ImageJ: Process->Filters->Median...

MIPR Lecture 5Copyright Oleh Tretiak, 2004

13

Find Edges

• ImageJ: Process->Find Edges

MIPR Lecture 5Copyright Oleh Tretiak, 2004

14

Image Operations

• Unary operations (Process->Math->...)– O(x, y) = log(I(x, y))– O(x, y) = 1/I(x, y)

• Binary operations with constant (Process->Math->...)– O(x, y) = I(x, y) + a– O(x, y) = I(x, y)*b

• Binary operations with images (Process->Image Calculator)– O(x, y) = I1(x, y) + I2(x, y)– O(x, y) = I1(x, y) – I2(x, y)

MIPR Lecture 5Copyright Oleh Tretiak, 2004

15

Example: Image Subtraction

Slice 22 Slice 23 22 - 23

MIPR Lecture 5Copyright Oleh Tretiak, 2004

16

Stacks

• Stacks are sequences of images, all have the same dimensions

• Most often, a stack is a sequence of slices through a 3-D object

• May be a time sequence (movie)

MIPR Lecture 5Copyright Oleh Tretiak, 2004

17

Example: Stack Converted to Montage

MIPR Lecture 5Copyright Oleh Tretiak, 2004

18

Image Measurements

• Types of Measurement– Geometry– Intensity

• ROI (region of interest)• Segmentation

MIPR Lecture 5Copyright Oleh Tretiak, 2004

19

Why Measure?

• Numbers are inputs to decisions• Example of geometric

measurement: Area• Example of intensity

measurement: amount of DNA

MIPR Lecture 5Copyright Oleh Tretiak, 2004

20

Measurements in ImageJ

• Area• Bounding

Rectangle• Circularity• Centroid• Perimeter• Fit Ellipse• Feret’s Diameter

• Grey value standard deviation

• Min & Max Grey Value

• Center of Mass• Mean Gray Value• Modal Gray Value

MIPR Lecture 5Copyright Oleh Tretiak, 2004

21

Example of Measurements

• Area 16384• Mean 158.431• StdDev 57.680• Mode 194• Min 0• Max 255• X 64• Y 64• ...

128x128

MIPR Lecture 5Copyright Oleh Tretiak, 2004

22

How to Measure Head Only?

• Specify region of interest (ROI)• Measure within ROI• Method of specifying ROI

– Manual– Automatic– Combination

MIPR Lecture 5Copyright Oleh Tretiak, 2004

23

Manual Selection Tools

• Rectangle• Oval• Polygon• Freehand

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Oval selection tool. Area 5626, Mean 97.139, ....

MIPR Lecture 5Copyright Oleh Tretiak, 2004

24

Semi-Automatic Selection

• Use Image->Adjust->Set Threshold to specify gray value to be measured

• Use magic wand to select objects• Measure the objects

Image with threshold settingQuickTime™ and a

TIFF (Uncompressed) decompressorare needed to see this picture.

QuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.

Selection madewith magic wand

MIPR Lecture 5Copyright Oleh Tretiak, 2004

26

Analyze Particles Command

• Find a point in image using specified threshold

• Trace outline with magic wand• Measure interior• Clear selection• Continue until done

MIPR Lecture 5Copyright Oleh Tretiak, 2004

27

MIPR Lecture 5Copyright Oleh Tretiak, 2004

28

Example

Images have been analyzed. 27 sets of measurements have been recorded.

MIPR Lecture 5Copyright Oleh Tretiak, 2004

29

Image Processing Methods

• Image enhancement• Image measurement

– Image enhancement can be a preliminary step to measurement

• Important image enhancement– Contrast adjustment– Image scaling

MIPR Lecture 5Copyright Oleh Tretiak, 2004

30

Image Measurements

• Specify ROI (region of interest, selection)

• Measure– Geometric features– Gray level features

• Manual ROI is reliable• Automatic ROI is sometimes

possible