37
06/20/22 1 Image Processing

11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

Embed Size (px)

Citation preview

Page 1: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 1

Image Processing

Page 2: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 2

Systems and Software

• Image file formats

• Image processing applications

Page 3: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 3

Image file formats

• Pixel images

• Graphic images

• Composite image files

• Images in manuscripts Graphic

Page 4: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 4

Format issues

• Color, monochrome

• Capability– Gray value

– Graphics

– Calibration: size, sensitometry, etc...

• Compatibility

• Compression

Page 5: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 5

Common formats• TIFF

– Common usage

– Versatile: pixel, calibration

– Pixel-based regions

– Dialects

• Raw

• EPS– versatile

– primarily, printed document format

• PICT, PICS– well developed standard

– pixel and graphic format

– primarily Macintosh

Page 6: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 6

Common formats (more)

• DICOM– used in medical imaging

• Graphic arts:– MPEG, JPEG, GIF

Import menu in NIH Image

Page 7: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 7

Image processing software functions

• Image acquisition

• Image processing

• Quantitative data extraction

• Annotation and editing

• Database management

• File format conversion

Page 8: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 8

Image processing software structure

• Task-dedicated

• General purpose

• Scripting/macro language

Page 9: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 9

Software package examples

• NIH Image– http://rsb.info.nih.gov/nih-image/

• Adobe Photoshop

Page 10: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 10

Examples

• NIH Image & file conversion

• Annotation

• Copying, pasting

Page 11: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 11

Software selection issues

• Compatibility with computer

• Functionality– Control of acquisition hardware (compatibility)

– Range of processing algorithms

• Productivity

Page 12: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 12

Image processing

• Contrast manipulation and enhancement

• Dyadic operation

• Image filtering

• Regions and region operation

• Image analysis

Page 13: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 13

Monadic (one picture) operations

• Contrast manipulation and enhancement

• LUT operation– brightness, contrast

– False color

• Gray value remap (apply LUT)

• Arithmetic operations

• Scale and rotate (also morphing)

• Other single image operations

Page 14: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 14

Monadic operations

• Profile plot (and projection)

• Gray value histogram

Page 15: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 15

Display operations

Gray scale manipulation

False color manipulation Enlarge, contract, scale to fit window

See Adobe Illustrator for image editing

Page 16: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 16

Example of rotation

(a) (b) (c)

(a) Original image, (b) rotated by 1.2°, nearest neighbor interpolation, (c) rotated by 1.2 °, bilinear interpolation.

Page 17: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 17

Examples of histograms

Page 18: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 18

Dyadic (two image) operations

Dyadic (two variable) function:ζ = f (ξ ,υ )

Example

ζ = ξ + υ

I3(x, y) = I1(x, y) + I2 (x, y)

Examples: addition, multiplication, subtraction, and division.

Problem: finite numerical range fro picture gray value leads to roundoff.

Page 19: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 19

Example: shading correctionModel :

M(x, y) =G(x,y)I(x,y) +B(x,y) I(x,y) - 'true' ,image M(x,y) - measured image

Calibration method : set I(x, y) to zero, measure B(x, y), the black field.

set I(x, y) to 1, measure W(x, y)=G(x,y) +B(x,y) .the white field

computeG(x, y) =W(x,y)−B(x,y)

Shading correction:

Measure M(x, y)

Compute the corrected signal.

I(x, y) =(M(x,y)−B(x,y)) /G(x,y)

Page 20: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 20

Image Filtering

• Convolution

• Rank filtering

• Edge detection

Page 21: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 21

Image filtering (conceptual)

Convolution:

I2 (x, y) = I1 (u,v)h(x−u, y−v)dudv∫∫Gradient:

I2 (x,y) =∂I1(x,y)

∂xLaplacian:

I2 (x,y) =∇2 I1 (x,y) ≡∂2 I1 (x,y)

∂x2+ ∂2 I1(x,y)

∂y2

Discrete:

I2 (i, j ) =k=−N

N∑ h(

l=−N

N∑ k, l )I1 (i−k, j−l )

Page 22: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 22

Convolution with the Fourier transform

Fourier transform:

FT[ I(x, y)](ξ ,η) = I(x,y)e−2π i(ξx+ηy)dxdy∫∫

FT[ I2 (x,y)](ξ ,η) =FT[ I1 (x,y)](ξ ,η)×FT[h(x,y)](ξ ,η)

I2 =FT−1 [FT[ I1(x, y)]×FT[h(x,y)][ ]

Page 23: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 23

Examples of linear filters

Low-pass (smooth, Gauss) High-pass (sharpen, Mexican Hat, DOG) Shadow First derivative (shadow, find edges)

Page 24: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 24

Example of smoothing

Smoothing (5 times)

Before After

Page 25: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 25

ConvolveOriginal Gauss (7x7) ‘Mexican hat’(17x17)

Grad N Grad W

Page 26: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 26

Nonlinear filters

Median (noise eliminate and enhance) Minimum (erode) Maximum (dilate) Open Close

Page 27: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 27

Example of morphological (rank) filters

Opening (3)

Closing (3)

Original

Minimum,erode (1)

Maximum,dilate (1)

Page 28: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 28

Example, grain counting

Grain image Maximum (5)

Difference

Page 29: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 29

Regions and region operation

• Thresholding, density slicing

• Erosion, dilation (rank filtering)

• Skeletons

Page 30: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 30

Image analysis

• Sensitometric

• Geometric

• Categorical (image recognition)

Page 31: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 31

Segmentation

• Geometrical shapes

• Interactive (outlining)

• Thresholding

• Filling

Page 32: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 32

Segmentation - connected area

Density slice, then use wand (auto-outline) to trace outline. Outline written on image with ‘draw boundary’ command.

Page 33: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 33

Region of interest (ROI) analysis

• Area

• Perimeter

• Shape

• Average value

• Standard deviation

Page 34: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 34

Example of measurement

126.00 132.48 39.27 14.37 11.16

Area Mean Length MinorMajor

Page 35: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 35

Summary

• Paradigm: scanning, preprocessing, analysis

• Success depends on all parts of analysis chain

• Quality control– Quantitative evaluation of performance

– Test samples

– Repeated analysis

Page 36: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 36

Summary

Digital image acquisition - physical data to numbers Control of accuracy

Experimental design

Experimental preparation

Scanner Scanner in the lab

Complex device, operation and maintenance

Quality control mandatory

Page 37: 11/29/2015 1 Image Processing. 11/29/2015 2 Systems and Software Image file formats Image processing applications

04/21/23 37

Houston, we have a problem.

COMPARISON OF STANDARDS

-1000

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

0 1000 2000 3000 4000 5000 6000 7000 8000

Nominal value (uCi/g)

Calibrated value (uCi/g)