Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij...

24
Institute of Informatics otv¨ os Lor´ and University Budapest, Hungary Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´ oy, Zolt´ an Megyesi, Zsolt Jank´ o http://visual.ipan.sztaki.hu

Transcript of Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij...

Page 1: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Institute of InformaticsEotvos Lorand University

Budapest, Hungary

Basic Algorithms for Digital Image Analysis:

a course

Dmitrij Csetverikov

with help of Attila Lerch, Judit Verestoy, Zoltan Megyesi, Zsolt Janko

http://visual.ipan.sztaki.hu

Page 2: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Topics of the Course

• Introduction: Tasks and applications of image analysis

• Image enhancement: Point and neighbourhood processing

• Template matching

• Feature detection: Edges, corners, lines.

• Image segmentation: Thresholding and region-based methods

• Processing of binary images: Medial axis, distance transforms, thinning andskeletons

• Morphological processing

• Shape analysis

2

Page 3: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Lecture 1: Introduction

Tasks and applications of image analysis

• Applications of image analysis

• Example: Industrial object recognition

• Computer vision, image processing and analysis

◦ Digital image◦ Entities of computer vision◦ Steps of object recognition: general case◦ Why is computer vision difficult?◦ Relation between computer graphics and image analysis

• About this course: Recommended literature

3

Page 4: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Applications of Image Analysis

Applications Domains1 Mail sorting, label reading, supermarket-product Document processing

billing, bank-check processing, text reading,interpretation of technical drawings

2 Tumour detection, measurement of size and Medical image analysisshape of internal organs, chromosome analysis,blood cell count

3 Part identification on assembly lines, Industrial automationdefect and fault inspection

4 Recognition and interpretation of objects in scene, Roboticsmotion control and execution throughvisual feedback

5 Map making from photographs, synthesis of Cartographyweather maps

6 Finger-print matching, face recognition, Forensics, securitygait analysis, other biometric measurements,for example, ear, iris

4

Page 5: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Applications Domains7 Face expression analysis, eye motion tracking, Man-machine interact.

gesture recognition8 Tracking of cars and people, analysis of Surveillance

events and activities9 Scene reconstruction from multiple views Virtual reality

and video, photorealistic models10 Image and video content based retrieval, Multimedia databases

indexing, representation and coding of shape,texture and motion

11 Target detection and identification, Radar imagingguiding of helicopters and aircraft in landing,guidance of remotely piloted vehicles, missilesand satellites from visual cues

12 Multispectral image analysis, weather prediction, Remote sensingclassification and monitoring of urban, agricultural,and marine environments from satellite images

5

Page 6: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

bottle inspection textile defect stone crack

ferrite core soil (ultrasonic) cable cross-section

Typical images: Industrial inspection, quality control.

6

Page 7: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

indoor outdoor statue (Peter I)

ikon (painting) logo fingerprint

Typical images: Indoor/outdoor scenes, image databases.

7

Page 8: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Aerial, stereo (Pentagon) ‘Aerial’, model board

Aerial, river Cosmic, Phobos

Typical images: Remote sensing.

8

Page 9: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

cells radiology spermatozoa

heart mammogram (breast) MRI tomography (brain)

Typical images: Biomedical applications.

9

Page 10: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

journal page map handwriting

bank receipt technical drawing

Typical images: Documents.

10

Page 11: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Example: Industrial object recognition

β

α

γ

Object Digital imageSensor,

1 0 0 0 01

Digitiser

1100...............

1 1 11 1 11 1 1

000 00 0

β

γ

α

1

1

α

β

γ

α

β

γ

2

2

2 3

3

3

Match against elements of

Image input, Preprocessing Feature Extraction,Segmentation,

Description

Classification,Interpretation

Description of object

Feature vector,

Knowledge base

knowledge base

Camera

Illumination

1

Framework of an industrial object recognition system.

11

Page 12: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

i

Curvature, etc.

Shape features:

Area, Momemts,

1

F

2

RLC, chainB(i,j)=0,1 B(i,j)=0,1I(i,j)=0-255

C1 = SCREWC2 = REJECT

Classes C1, C2:Positions of 1 and 2

imagegray-scale binary

imagebinaryimage

segmentednoise-freenoisyoriginal

image objectsrecognisedfeature

vector

thresholding

(binarisation)

noise filtering

(enhancement)

classification

(recognition)

IMAGE PROCESSING IMAGE ANALYSIS PATTERN RECOGNITION

(low-level vision) (medium-level vision) (high-level vision)

topol. analysis

(segmentation)

feature comput.

(description)

code, etc.

Main steps of industrial object recognition.

12

Page 13: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Computer Vision, Image Processing and Analysis

Goal of computer vision: Provide methods for solving automation tasks related toprocessing of visual information, including:

• Detection and recognition of known objects

• Obtaining geometric models of unknown objects

• Computing position and orientation of objects

• Measurement of spatial properties of objects (distances, sizes, etc.)

• Measurement of object motion

• Measurement of surface texture and colour

13

Page 14: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Digital image

Image is a spatial representation of an object, a 2D or 3D scene, or another image:

• Intensity image: I(r, c) is proportional to radiant electromagnetic energy reflectedby object surface and received by sensor.

• Range image: I(r, c) is a function of line-of-sight distance between (r, c) and anobject in 3D world.

• Tactile sensors: I(r, c) is proportional to sensor deformation caused by surfaceat (r, c).

• Symbolic image: I(r, c) is a label, index, or symbol associated with somecategory, e.g. colour, thematic land use, soil type, rock type, etc.

14

Page 15: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Entities (units) of computer vision

• Unit of observation is pixel: value of I(r, c) discretised to a certain number ofgrades (e.g. 255).

• 3D object feature: point, line segment, surface patch.

• 2D image feature: point, line segment, region.

• Correspondence between object features and image features.

• Relation between object features.

• Relation between image features.

• Sensor position/orientation.

• Object position/orientation.

15

Page 16: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Steps of object recognition: general case

• Image formation (sensors, illumination, surface reflection models, etc.)

• Enhancement: Image is composed of informative pattern modified by non-informative variations. Enhance informative pattern based on image data.

◦ Examples: noise filtering, geometric correction.

• Feature-based segmentation: Informative pattern is arrangement of features.Each feature is a set of connected pixels. Assign features to pixels.

◦ Examples: thresholding, edge detection

16

Page 17: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

• Region-based segmentation, or grouping: Collect together pixels belonging tothe same feature and form regions or other entities (e.g., lines).

◦ Examples: connected component analysis, edge linking

• Region description: Compute properties of regions. Measure spatial/topologicalrelations between regions/entities.

◦ Examples: areas, centroids, orientations, dimensions, distances

• Matching: Interpret the image by establishing correspondences between themeasured entities and a scene model.

◦ Example: Recognising a letter based on its measured elements.

17

Page 18: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

andKnowledge base

Representationand description

Result

Preprocessing

Problem

Image

Segmentation

Recognition

interpretation

acquisition

domain

Block diagram of an image analysis system.

18

Page 19: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Why is computer vision difficult?

Inherent problem of computer vision: Units of observation (pixels) are not units ofanalysis.

• By itself, pixel gives no information related to tasks of image analysis.

◦ Given: pixel values I(r, c)◦ Desired result: Count chairs in the room

Additional problems:

• Noisy, incomplete, missing input data with outliers.

◦ Physical measurements!

• Often, no satisfactory mathematical model is available for image features.

◦ How to formalise what we see?

19

Page 20: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Relation between computer graphics and image analysis

• Computer graphics: Receives mathematical description, produces image.

◦ Direct problem, synthesis

• Image analysis: Receives image, produces mathematical description.

◦ Reverse problem, analysis◦ More difficult

• Image processing: Receives image, produces another image.

20

Page 21: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Image Processing

Image Analysis

Image

Graphics

Description

Relation between computer graphics, image processing and image analysis.

21

Page 22: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

About this course

This course is devoted to basic tools of image processing and analysis.

• 2D image processing and analysis considered: low- and medium-level vision

• No 3D computer vision, no stereo

• No high-level tasks (classification, structural methods)

• No motion analysis, no sequences: single image only

• No image formation, no colour

• Minimum of theory

• Accent on understanding and use of methods

• Description sufficient for implementation

22

Page 23: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Literature used in this course

1. E.Trucco, A.Verri, ”Introductory Techniques for 3-D Computer Vision”, PrenticeHall, 1998.

2. R.Klette, P.Zamperoni, ”Handbook of Image Processing Operators”, J.Wileyand Sons, 1996.

3. I.Pitas, ”Digital Image Processing Algorithms”, Prentice-Hall, 1993.

4. R.C.Gonzales, R.E.Woods, ”Digital Image Processing”, Addison-Wesley, 1993.

5. R.M.Haralick, L.G.Shapiro, ”Computer and Robot Vision”, Addison-Wesley,volumes I-II, 1992-1993.

6. A.K.Jain, ”Fundamentals of Digital Image Processing”, Prentice-Hall, 1989.

7. Allo G., ”A Digitalis Kepfeldolgozas Alapproblemai”, Akademiai Kiado, 1989.

23

Page 24: Dmitrij Csetverikov - u-szeged.hu · Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verest´oy, Zolt´an Megyesi, ... label

Other recommended literature

1. M.Sonka, V.Hlavac, R.Boyle, ”Image Processing, Analysis and Machine Vision”,Chapman and Hall, 1999.

2. B.Jahne, ”Digital Image Processing”, Springer, 1997 or later edition.

3. W.K.Pratt, ”Digital Image Processing”, J.Wiley and Sons, 1992.

4. A.Rosenfeld, A.C.Kak, ”Digital Picture Processing”, Academic Press, volumesI-II, 1982.

24