part 1 introduction to digital image processingcanerozcan.net/files/cme429/cme429_week1.pdfcme429...

58
CME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction to Digital Image Processing Fall in love with the process, and the results will come. ~ Eric Thomas

Upload: others

Post on 21-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

CME429 Introduction to Image Processing

Assist. Prof. Dr. Caner ÖZCAN

Part 1 Introduction to Digital Image

Processing

Fall in love with the process, and the results will come. ~ Eric Thomas

Page 2: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Introduction to the Course

2

►Course Web Site: www.canerozcan.net

►Office Hours: Tuesday 13:00-15:00 Wednesday 15:30-17:00 or appointment by email:

[email protected]

►Textbooks: – Sayısal Görüntü İşleme, Palme Yayıncılık, Üçüncü Baskıdan

Çeviri (Orj: Digital Image Processing, R.C. Gonzalez, R.E. Woods) – “Digital Image Processing Using Matlab”, Gonzalez & Richard E.

Woods, Steven L. Eddins, Gatesmark Publishing, 2009

Page 3: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Introduction to the Course

3

Page 4: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Course Objectives

4

►Cover basic theory and algorithms widely used in image processing

►Develop hands-on experience in processing images

►Familiarize with Matlab and OpenCV (Open Source Computer Vision)

►Develop critical thinking about the state of the art

Page 5: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Prerequisites

5

►Signals and systems

►Linear algebra

– Matrices, Matrix Operations

– Determinants, Systems of Linear Equations

►Probability and Statistics

– Probability density function

– Probability distribution

– Mean, variance, co-variance, correlation

– Gaussian distribution

►Good programming skills

Page 6: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Introduction to the Course

6

►Grading Midterm Exam: 40%

Final Exam: 60%

►Bonus: Presentation

Homework

Project

Page 7: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Introduction to the Course

7

► Project Hand Gesture Recognition Iris Recognition Biomedical Image Segmentation and Recognition Content-Based Image Retrieval Fingerprint Recognition Object Tracking in Video Sequences Face and Plate Recognition Watermarking Image Compression Automatic Quality Inspection Traffic Surveillance Security Applications Radar Image Processing Applications Whatever you’re interested …

Page 8: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Outline

8

1. Introduction ► What Is Digital Image Processing?

► The Origins of Digital Image Processing

► Examples of Fields that Use Digital Image Processing

► Fundamental Steps in Digital Image Processing

► Components of an Image Processing System

Page 9: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

A picture is worth a thousand words!!

9

Page 10: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Introduction

10

Page 11: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Introduction

11

When the mosaics are closely examined, it is seen that they are made up of

small squares like a digital image.

Page 12: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

►Digital image processing focuses on two main tasks Improvement of image information for people's perception and

interpretation

Processing of image data for storage, transmission and good detection of machines

►There are debates about where the image processing ends and where other areas such as image analysis and computer vision begin.

What Is Digital Image Processing?

Page 13: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

►We can divide the area from image processing to computer vision to three levels: low, medium and high.

Low Level Processing

Input: Image

Output: Image

Examples: Denoising,

image sharpening

Medium Level Processing

Input: Image

Output: Features

Examples: Object

recognition,

segmentation

High Level Processing

Input: Features

Output: Recognition

Examples: Screen

recognition, automatic

navigation

We're gonna

stay here.

What Is Digital Image Processing?

Page 14: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Introduction

14

►What is Digital Image Processing?

Digital Image

— a two-dimensional function

x and y are spatial coordinates

The amplitude of f is called intensity or gray level at the point (x, y)

Digital Image Processing

— process digital images by means of computer, it covers low-, mid-, and high-level processes

low-level: inputs and outputs are images

mid-level: outputs are attributes extracted from input images

high-level: an ensemble of recognition of individual objects

Pixel — the elements of a digital image

( , )f x y

Page 15: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

submarine cable between London-New York

Start of the Digital Image Processing

15

Page 16: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Origins of Digital Image Processing

16

Sent by submarine cable between London and New York, the transportation time was reduced to less than three hours from more than a week

Page 17: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Origins of Digital Image Processing

17

Page 18: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Origins of Digital Image Processing

18

Page 19: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Sources for Images

19

► Electromagnetic (EM) energy spectrum

► Acoustic

► Ultrasonic

► Electronic

► Synthetic images produced by computer

Page 20: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Electromagnetic (EM) energy spectrum

20

Major uses

• Gamma-ray imaging: nuclear medicine and astronomical observations

• X-rays: medical diagnostics, industry, and astronomy, etc.

• Ultraviolet: lithography, industrial inspection, microscopy, lasers, biological imaging, and astronomical observations

• Visible and infrared bands: light microscopy, astronomy, remote sensing, industry, and law enforcement

• Microwave band: radar

• Radio band: medicine (such as MRI) and astronomy

Page 21: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

21

Examples: Gama-Ray Imaging

Page 22: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

22

Examples: X-Ray Imaging

Page 23: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

23

Examples: Ultraviolet Imaging

Page 24: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

24

Examples: Light Microscopy Imaging

Page 25: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

25

Examples: Visible and Infrared Imaging

Page 26: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

26

Examples: Visible and Infrared Imaging

Page 27: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

27

USA 1993 USA 2003

Examples: Infrared Satellite Imaging

Page 28: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

28

Examples: Infrared Satellite Imaging

Page 29: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

29

Examples: Automated Visual Inspection

Page 30: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

30

The area in which the imaging system detected the plate

Results of automated reading of the plate content by the system

Examples: Automated Visual Inspection

Page 31: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

31

Example of Radar Image

Page 32: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

32

Examples: MRI (Radio Band)

Page 33: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

33

Examples: Electromagnetic Spectrum

Page 34: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

34

Examples: Ultrasound Imaging

Page 35: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

35

Result is more suitable than the original

Improving the appearance

Extracting image components

Partition an image into its constituent parts or objects

Represent image for computer processing

Fundamental Steps in DIP

Page 36: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image

Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Image Acquisition

Page 37: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Image Enhancement

Page 38: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image

Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Image Restoration

Page 39: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Morphological Processing

Page 40: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Segmentation

Page 41: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object

Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Object Recognition

Page 42: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation

and Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Representation & Description

Page 43: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Compression

Page 44: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

Image Acquisition

Image Restoration Morphological

Processing

Segmentation

Representation and

Description

Image

Enhancement

Object Recognition

Problem Domain

Color Image

Processing Compression

Fundamental Steps in DIP: Color Image Processing

Page 45: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

45

Sample Problems

►Edge Detection

►Image Denoising

►Image Smoothing

►Image Segmentation

►Image Registration

►Image Inpainting

►…

Page 46: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

46

Edge Detection

►Edges: abrupt changes in the intensity • Uniformity of intensity or color

►Edges to object boundaries

Page 47: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

47

Image Filtering

► Difficulty: Some of the irrelevant image information have characteristics similar to those of important image features.

Page 48: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

48

Image Denoising

► Images are corrupted with 70% salt-and-pepper noise.

Page 49: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

49

Image Smoothing

Page 50: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

50

Image Segmentation

► Partition an image into meaningful regions that are likely to correspond to objects exist in the image.

Page 51: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

51

Registration

Page 52: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

52

Image Inpainting

► Reconstructing lost or deteriorated parts of images

Page 53: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

53

Components of an Image Processing System

Page 54: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

54

Image Processing Toolboxes and Softwares

► Matlab

► OpenCV

► etc.

Page 55: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

55

Matlab Image Processing Toolbox

► Matlab is optimized for operating on matrices. Images are matrices!

► It provides a comprehensive set of reference-standard algorithms, functions, and apps for image processing, analysis, visualization, and algorithm development.

► You can perform image analysis, image segmentation, image enhancement, noise reduction, geometric transformations, and image registration.

► Many toolbox functions support multicore processors, GPUs, and C-code generation.

Page 56: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

56

OpenCV

► OpenCV means Intel® Open Source Computer Vision Library.

► It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms.

► It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android.

► FREE for commercial and non-commercial uses. ► Written in optimized C/C++, the library can take

advantage of multi-core processing. ► Available on Sourceforge

• http://opencv.org/ • http://sourceforge.net/projects/opencvlibrary/

Page 57: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

57

Image Processing Toolboxes

► In C/C++ • IPL ... : http://www.cs.nott.ac.uk/~jzg/nottsvision/old/index.html

• OpenCV: http://sourceforge.net/projects/opencvlibrary

• ImageMagick: http://www.imagemagick.org/

• Insight Toolkit ITK (medical image) : http://www.itk.org/

• mathtools.net: http://www.mathtools.net/C_C__/Image_Processing/

► In Java • Java Media APIs: JAI, JMF, Java image I/O ...:

http://java.sun.com/javase/technologies/desktop/media/

• http://www.mathtools.net/Java/Image_Processing/index.htmlPython

► Python Imaging Library (PIL) • http://www.pythonware.com/products/pil/

• numpy, scipy

► SciKit

Page 58: Part 1 Introduction to Digital Image Processingcanerozcan.net/files/CME429/CME429_Week1.pdfCME429 Introduction to Image Processing Assist. Prof. Dr. Caner ÖZCAN Part 1 Introduction

References

58

►Sayısal Görüntü İşleme, Palme Publishing, Third Press Trans. (Orj: R.C. Gonzalez and R.E. Woods: "Digital Image Processing", Prentice Hall, 3rd edition, 2008).

►“Digital Image Processing Using Matlab”, Gonzalez & Richard E. Woods, Steven L. Eddins, Gatesmark Publishing, 2009

►Lecture Notes, CS589-04 Digital Image Processing, Frank (Qingzhong) Liu, http://www.cs.nmt.edu/~ip

►Lecture Notes, BIL717-Image Processing, Erkut Erdem

►Lecture Notes, EBM537-Image Processing, F.Karabiber