july 27, 2002 image processing for k.r. precision1 image processing training lecture 1 by suthep...

46
July 27, 2002 Image Processing for K.R. Preci sion 1 Image Processing Image Processing Training Lecture 1 Training Lecture 1 by Suthep Madarasmi, Ph.D. Assistant Professor Department of Computer Engineering King Mongkut’s University of Technology Thonburi

Upload: lizbeth-bates

Post on 17-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

July 27, 2002 Image Processing for K.R. Precision 1

Image Processing Training Image Processing Training Lecture 1Lecture 1

by Suthep Madarasmi, Ph.D.

Assistant Professor

Department of Computer Engineering

King Mongkut’s University of Technology Thonburi

July 27, 2002 Image Processing for K.R. Precision 2

Presentation Overview Presentation Overview

1.0 Image Formation1.1 Image Formats and Types1.2 Image Formation Models1.3 Coordinate Transformations 1.4 Camera Calibration

2.0 Binary Images 2.1 Histograms 2.2 Thresholding Techniques2.3 Example: Rubber Inspection2.4 Binary Image Features2.5 Measurement and Accuracy

3.0 Image Filtering3.1 Convolution Operation3.2 Common Filters3.3 Template Matching3.4 Edge Detection3.4 Example: Paper 3.6 Texture Features 3.7 Example: Food

Introduction

July 27, 2002 Image Processing for K.R. Precision 3

Input Image

Output Image

Image Precessing

Image Processing:

• Image Enhancement

• Edge Finding

• Image Segmentation

Machine Vision:

• Scene Description

• Shape Information

• Object Recognition

What is Image ProcessingWhat is Image Processing

Introduction

July 27, 2002 Image Processing for K.R. Precision 4

Image Formation ModelImage Formation Model

1.0 Image Formation

July 27, 2002 Image Processing for K.R. Precision 5

Image Projection ModelImage Projection Model

Z

Xf

xx = Xf/Z; y = Yf/Z

1.0 Image Formation

July 27, 2002 Image Processing for K.R. Precision 6

Digital Image RepresentationDigital Image Representation

1.0 Image Formation

July 27, 2002 Image Processing for K.R. Precision 7

Images Spatial ResolutionImages Spatial Resolution

1.0 Image Formation

July 27, 2002 Image Processing for K.R. Precision 8

Gray Level ResolutionsGray Level Resolutions

1.0 Image Formation

July 27, 2002 Image Processing for K.R. Precision 9

Digital Image FormatsDigital Image Formats

RGB Images CMYK Images 256 Indexed Color Images 16 Indexed Color Images Gray Scale Images (8 bit) Gray Scale Images (4 bit) Black and White Images Image Types:

GIF, JPG, BMP, TIF, Multi-Page TIF, PDF, PS, RTF, etc.

1.1 Image Formats and Types

July 27, 2002 Image Processing for K.R. Precision 10

Coordinate TransformationsCoordinate Transformations

3-D Transformations: Rotation & Translation Object Coordinates 3D World Coordinates 3D Camera Coordinates 3D Image Coordinates 2D, Continuous Cartesian Image Coordinates 2D, Discreet Cartesian (x, y) Image Coordinates 2D, Device Independent (r, c) Image Coordinates 2D, Device Coordinates (x, y)

1.3 Coordinate Transformations

July 27, 2002 Image Processing for K.R. Precision 11

Camera CalibrationCamera Calibration

1.4 Camera Calibration

July 27, 2002 Image Processing for K.R. Precision 12

Binary ImagesBinary Images

1.0 Binary Images

July 27, 2002 Image Processing for K.R. Precision 13

Binary Image Assumed from Binary Image Assumed from 2 Sources with Gaussian 2 Sources with Gaussian NoiseNoise

2.0 Binary Images

July 27, 2002 Image Processing for K.R. Precision 14

Image HistogramImage Histogram

A histogram is the count of each gray scale within the image

Histogray may represent P[i], where i is gray value between 0..255.

Histograms are used to look at gray scale distribution for thresholding to binary image

Examples of Histograms

2.1 Histograms

July 27, 2002 Image Processing for K.R. Precision 15

Histogram Equalization: Histogram Equalization: ScalingScaling

2.1 Histograms

July 27, 2002 Image Processing for K.R. Precision 16

Histogram EqualizationHistogram Equalization

2.1 Histograms

July 27, 2002 Image Processing for K.R. Precision 17

P-Tile Method for ThresholdP-Tile Method for Threshold

2.2 Thresholding Techniques

July 27, 2002 Image Processing for K.R. Precision 18

Region Segmentation for Region Segmentation for Multiple ObjectsMultiple Objects

2.2 Thresholding Techniques

July 27, 2002 Image Processing for K.R. Precision 19

Problem with Single Problem with Single ThresholdThreshold

2.2 Thresholding Techniques

July 27, 2002 Image Processing for K.R. Precision 20

Automatic Threshold MethodAutomatic Threshold Method

2.2 Thresholding Techniques

July 27, 2002 Image Processing for K.R. Precision 21

Adaptive Thresholding by Adaptive Thresholding by RegionsRegions

2.2 Thresholding Techniques

July 27, 2002 Image Processing for K.R. Precision 22

Rubber Sheet InspectionRubber Sheet Inspection

2.3 Example: Rubber Inspection

July 27, 2002 Image Processing for K.R. Precision 23

Rubber: Multiple ThresholdRubber: Multiple Threshold

Input Image ofBackIlluminatedRubber Sheet

Preprocessing1: NoiseRemoval viaGaussian Blur

Preprocessing2: BoundaryErosion

Partition imageinto rectangularregions

AutomaticThresholding fromHistogram PerRegion

Threshold

BinaryImagePerRegion

AssembledBinaryImage ofDefects

2.3 Example: Rubber Inspection

July 27, 2002 Image Processing for K.R. Precision 24

b.

c.

d.

e.

a.

b.

c.

d.

e.

a.

b.

Rubber: Example OutputRubber: Example Output

2.3 Example: Rubber Inspection

July 27, 2002 Image Processing for K.R. Precision 25

Size Filter to Noisy Binary Size Filter to Noisy Binary ImageImage

2.4 Binary Image Features

July 27, 2002 Image Processing for K.R. Precision 26

Computing Position Computing Position (Centroid)(Centroid)

2.4 Binary Image Features

July 27, 2002 Image Processing for K.R. Precision 27

Iterative Thinning OperationsIterative Thinning Operations

2.4 Binary Image Features

July 27, 2002 Image Processing for K.R. Precision 28

Expanding and ShrinkingExpanding and Shrinking

2.4 Binary Image Features

July 27, 2002 Image Processing for K.R. Precision 29

Horizontal and Vertical Horizontal and Vertical ProjectionsProjections

2.4 Binary Image Features

July 27, 2002 Image Processing for K.R. Precision 30

Projections for OCRProjections for OCR

2.4 Binary Image Features

July 27, 2002 Image Processing for K.R. Precision 31

Image Convolution: FilteringImage Convolution: Filtering

3.0 Image Filtering, Correlation Operations

July 27, 2002 Image Processing for K.R. Precision 32

Salt / Pepper and Gaussian Salt / Pepper and Gaussian NoiseNoise

3.2 Common Filters

July 27, 2002 Image Processing for K.R. Precision 33

Applying the Mean FilterApplying the Mean Filter

3.2 Common Filtes

July 27, 2002 Image Processing for K.R. Precision 34

Result of 3x3, 5x5, and 7x7 Result of 3x3, 5x5, and 7x7 mean filtermean filter

3.2 Common Filters

July 27, 2002 Image Processing for K.R. Precision 35

Applying the Median FilterApplying the Median Filter

3.2 Common Filters

July 27, 2002 Image Processing for K.R. Precision 36

The Gaussian Filter: The Gaussian Filter: Continuous Continuous

3.2 Common Filters

July 27, 2002 Image Processing for K.R. Precision 37

Template MatchingTemplate Matching

Template matching is the sum squared difference between image and template

Very similar to Convolution Used for Recognition: OCR and Others

3.3 Template Matching

July 27, 2002 Image Processing for K.R. Precision 38

A Discreet (Digital) Gaussian A Discreet (Digital) Gaussian FilterFilter

3.2 Common Filters

July 27, 2002 Image Processing for K.R. Precision 39

Edges: First & Second Edges: First & Second DerivativesDerivatives

3.4 Edge Detection

July 27, 2002 Image Processing for K.R. Precision 40

LOG (Laplacian of Gaussian) LOG (Laplacian of Gaussian) FilterFilter

3.4 Edge Detection

July 27, 2002 Image Processing for K.R. Precision 41

LOG MasksLOG Masks

3.4 Edge Detection

July 27, 2002 Image Processing for K.R. Precision 42

Paper InspectionPaper Inspection

3.4 Example: Paper Inspection

July 27, 2002 Image Processing for K.R. Precision 43

Paper Inspection: DefectsPaper Inspection: Defects

3.4 Example: Paper Inspection

July 27, 2002 Image Processing for K.R. Precision 44

Texture Feature ExtractionTexture Feature Extraction

Texture: Statistical Distribution of Gray Co-Occurence Matrix captures distribution Texture Measures from Co-Occurence:

Entropy Energy Homogeneity

3.6 Texture Features

July 27, 2002 Image Processing for K.R. Precision 45

Food Inspection: TextureFood Inspection: Texture

3.7 Example: Food Inspection

July 27, 2002 Image Processing for K.R. Precision 46

Food Texture: Method & Food Texture: Method & ResultsResults

หา Co-occurrence matrixที่�� d[3,3] และ d[-3,3]

กรองเฉล��ย

LoG

3.7 Example: Food Inspection