Top Banner
MTAT.03.260 Pattern Recognition and Image Analysis 1 1. Fundamentals of digital imaging and human perception Silver Leinberg
44

1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

Aug 25, 2018

Download

Documents

duongcong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 1

1. Fundamentals of digital imaging and human perception

Silver Leinberg

Page 2: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 2

What Is Digital Image Processing?

● Image may be defined as 2D function f(x,y)– x, y – spatial coordinates

– f – grey level

● Image is called digital image, when f, x, y are finite and discrete quantities.

● Pixels● Low-, mid- and high level processing

Page 3: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 3

Contents

● Origins● Various digital image processing fields● Human perception● Basics in digital image processing● Programming environment

Page 4: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 4

The Origins

● Digital images– Submarine cable between London and New York

– 1920 Bartlane system with 5 levels of grey

– 1929 15 levels of grey

– 1964 pictures of moon taken by US spacecraft

Page 5: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 5

The Origins

● Digital computers– 1940 key concepts by John von Neumann

– 1948 transistor

– 1958 integrated circuit

– 1960s operating systems, high level programming languages (COBOL, FORTRAN)

– 1970s microprocessor

– 1981 personal computer

Page 6: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 6

Contents

● Origins● Various digital image processing fields● Human perception● Basics in digital image processing● Programming environment

Page 7: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 7

Applications by EM spectrum

● Gamma-ray Imaging● X-ray Imaging● Imaging in the Ultraviolet Band● Imaging in the Visible and Infra-red Band● Imaging in the Microwave Band● Imaging in the Radio Band● Other Imaging Modalities

Page 8: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 8

EM spectrum

Page 9: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 9

Gamma-ray Imaging

● Nuclear medicine– A small dose of radioactive isotope is injected to

patient and images are produces by gamma ray detectors, positron emission tomography (PET)

● Astronomical observation● Inspection of nuclear objects

Page 10: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 10

X-ray imaging

● Medical diagnostics– 2D: X-ray photography, contrast enhancement

radiography (angiography)

– 3D: Computerized axial tomography (CAT)

● Industry– Circuit board inspection

● Astronomy

Page 11: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 11

Imaging in the UV Band

● Fluorescence microscopy– Invisible ultraviolet light makes fluorescent

material to shine in visible region

● Astronomy

Page 12: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 12

Visible and Infra-red Band

● Microscopy● Remote sensing● Weather observation● Automated inspection of products● Law enforcement (fingerprints, reading serial

numbers from paper currency, vehicle licence plate etc.)

Page 13: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 13

Imaging in the Microwave Band

● Radar– Radiates microwave pulses to illuminate an area

of interest and registers microwaves that was reflected back to radar antenna.

Page 14: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 14

Imaging in the Radio Band

● Medicine– Magnetic resonance imaging (MRI)

● Astronomy

Page 15: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 15

Other Imaging Modalities

● Acoustic imaging– Geological exploration (minerals, oil)

– Industry

– Medicine (imaging of unborn baby with ultrasound)

● Electron microscopy (SEM, TEM)● Computer generated imaging (fractals, flight

simulators)

Page 16: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 16

Contents

● Origins● Various digital image processing fields● Human perception● Basics in digital image processing● Programming environment

Page 17: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 17

Structure of the Human Eye

Page 18: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 18

Cones and Rods

● Cones:– 6..7 million

– Located in centre of retina (fovea)

– Highly sensitive to colour

– Bright-light (photopic) vision

● Rods:– 75..150 million

– Distributed over the retina

– Not involved in colour vision

– Dim-light (scotopic) vision

Page 19: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 19

Cones and Rods

Page 20: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 20

Colour sensing

Page 21: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 21

Colour sensing (stare at the dot)

Page 22: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 22

Brightness Adaptation and Discrimination

Page 23: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 23

Brightness Adaptation and Discrimination

Page 24: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 24

Illusions

Page 25: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 25

Contents

● Origins● Various digital image processing fields● Human perception● Basics in digital image processing● Programming environment

Page 26: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 26

Light

● Wavelength (λ), frequency (ν), energy (E)– λ = c / ν (400 nm .. 750 nm)– E = h * ν (3.1 eV .. 1.65 eV)

● Intensity: radiance, luminance, brightness● Spectral distribution● Polarisation

Page 27: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 27

White LED spectrum

Page 28: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 28

Image Sensing and Acquisition

● Sensor arrangement– Single imaging sensor (SEM)

– Line sensor (scanner, CAT, PET, MRI)

– Array sensor (CCD, CMOS)

Page 29: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 29

Image Sensing and Acquisition

Page 30: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 30

Image Formation Model

● f(x,y) = i(x,y) * r(x,y)– i(x,y) – illumination (90000 .. 0.1 lm/m2)

– r(x,y) – reflectance or transmittance (0 .. 1)

● Gray level l = f(x,y) Lmin ≤ l ≤ Lmax

● Gray scale [Lmin, Lmax]– [0, L-1], L = 2^k– dynamic range

Page 31: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 31

Image Sampling and Quantization

● Digitalizing – by coordinate values – sampling (M x N)

– by amplitude values – quantization (L = 2^k)

Page 32: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 32

Sampling

Page 33: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 33

Quantization

Page 34: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 34

Quantization

Page 35: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 35

Zooming and Shrinking

● Zooming– nearest neighbour interpolation

● pixel replication● bilinear interpolation

● Shrinking– aliasing effect

● blurring

Page 36: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 36

Relationships Between Pixels

● Neighbours of a pixel– N4(p), horizontal and vertical neighbours

– ND(p), diagonal neighbours

– N8(p) = N4(p) + ND(p)

Page 37: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 37

Relationships Between Pixels

● Adjacency– 4-adjacency: same value & in N4

– 8-adjacency: same value & in N8

– m(ixed)-adjacency: same value &● In N4 or● In ND, without common 4-adjacent neighbour

● Closed path, connected set, region, boundary

Page 38: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 38

Relationships Between Pixels

● Distance

– Euclidean distance: De(p,q)=[(x-s)²+(y-t)²]^½– D4 distance: D4(p,q) = |x - s| + |y – t|– D8 distance: D8(p,q) = max(|x – s|, |y – t|)– Dm distance

Page 39: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 39

Linear and Non-linear Operations

● An operator H is said to be linear if

H(af + bg) = aH(f) + bH(g)

where a, b are scalars and f, g are images– Sum operator is linear

– Absolute value of difference of two images in not

Page 40: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 40

Contents

● Origins● Various digital image processing fields● Human perception● Basics in digital image processing● Programming environment

Page 41: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 41

Scilab: Basic Matrix Operations

– -->zeros(4,5), ones(2, 3)

– -->rand(2, 3)

– -->A = [11 12; 21 22]

– -->A(1, 2)

– -->A(1, 2:-1:1)

– -->A(1, 1:2)

– -->A(1, :)

– -->A(:)

– -->A(:,2) = 0

– -->size(A, 2)

– -->linspace(3, 1, 5)

– -->sum(A)

– -->plot(A(1,:))

– ==, ~=, >, >=, <, <=, &, |, ~

– -, +, *, .*, /, ./, \, .\, ^, .^, ', .'

– Transpose -->A.'

Page 42: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 42

Scilab: Basic Image Operations

– -->atomsInatall SIVP

– -->f = imread('image1.bmp');

– -->imshow(f)

– -->imwrite(f, 'image2.bmp')

– -->g = im2double(f);

– -->g = mat2gray(A)

– -->th = 0.3, g = im2bw(f, th)● th - treshold

Page 43: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 43

Scilab: Basic Image Operations

● imadd(im1, im2)● imsubtract(im1, im2)● immultiply(im1, im2)● imdivide(im1, im2)● imabsdiff(im1, im2)● imcomplement(im)● Imlincomb(...)

Page 44: 1. Fundamentals of digital imaging and human perception · 1. Fundamentals of digital imaging and human perception ... – Submarine cable between London and New York – 1920 Bartlane

MTAT.03.260 Pattern Recognition and Image Analysis 44

Scilab: Various Commands

● tic, toc – for timing● -->T = input('enter data')● strcmp(string1, string2) – compare strings● -->help● -->help functionName