Top Banner
2011-08-30 E0005E Industrial Image Analysis 1
45

2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Jun 27, 2020

Download

Documents

dariahiddleston
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: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E Industrial Image Analysis 1

Page 2: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

INSTITUTIONEN FÖR SYSTEMTEKNIK

LULEÅ TEKNISKA UNIVERSITET

2011-08-30 E0005E, Course Introduction 2

E0005E Industrial Image Analysis

Matthew Thurley, Teacher

Anders Landstöm, Lab Assistant

[email protected]

[email protected]

Page 3: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

What you need to know

• Course Study guide (read this carefully)

- Course structure, topics, assessment criteria

- This course has a problem based learning approach

- The assignments are Development Phases in the production of an industrial measurement system

• Course web page http://www.ltu.se/edu/course/E00/E0005E/E0005E-Industriell-bildanalys-1.36192?l=en

• Fronter https://fronter.com/ltu/

- Has a virtual room with general course information.

- Submit assignments in Fronter

- login and go to the course room E0005E Industrial Image Analysis H1* There is a Submissions link in the left column.

- Submit in the correct folder. If you are late you will have to submit in the Late Submissions folder

2011-08-30 E0005E Industrial Image Analysis 3

Page 4: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

What you need to know

• Attendance – Make sure you are registered

• Plagarism - ”copying another persons work and presenting it as your own”

- Watch this video

- http://www.youtube.com/watch?v=Mwbw9KF-ACY&feature=related

- Press the CC button to turn english subtitles on or off

- Ephorus compares your submission against millions of documents from the internet and against past submissions in this course

2011-08-30 E0005E, Lecture 3 4

Page 5: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Ephorus Example 4% Match

2011-08-30 E0005E Industrial Image Analysis 5

Page 6: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Course Introduction 6

Labs

• Labs must be done individually (you can of course discuss problems and solutions with your friends but you must do your own coding and report writing)

• Lab 8 may have some group work, but you still must write your own report

• Helpful documents

- MATLAB-Tips.pdf

- ReportTemplate.doc

Page 7: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Course Introduction 7

The lab environment

• A2506 in the A-building

• We will use Matlab for the assignments

Variable and

directory

browser

Command

history

Command window

Page 8: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

DIGITAL IMAGES

Matthew Thurley

E0005E Industrial Image Analysis

2011-08-30 E0005E, Industrial Image Analysis 8

Page 9: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E Industrial Image Analysis 9

Light

Page 10: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Imaging based on Gamma Rays • Nuclear medicine,

Injecting radioactive isotopes into the body that emit gamma rays (a) or cause the emission of gamma rays (b)

• (c) Gamma ray band image of the ”Cynus Loop” interstellar gas cloud, the remnant of an exploded star

• (d) Gamma ray image of a valve in a nuclear reactor

2011-08-30 E0005E Industrial Image Analysis 10

Page 11: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Imaging based on Gamma Rays

“An image taken by a gamma ray camera showing the bottom of a ventilation stack standing between Fukushima Daiichi nuclear power plant's No.1 and No.2 reactors, where radiation exceeding 10 sieverts per hour - seen here in red” 2011-08-02 blog post

“a level that could lead to incapacitation or death after just several seconds of exposure”

http://photoblog.msnbc.msn.com/_news/2011/08/02/7227954-lethal-levels-of-radiation-recorded-in-fukushima-gamma-ray-image

2011-08-30 E0005E Industrial Image Analysis 11

Page 12: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

X-ray Imaging • Medicine, familiar chest x-ray (a). An x-

ray source behind the patient sends x-rays through the patient towards a detector on the other side. X-rays are absorbed by tissue and bone reducing the x-ray strength arriving at the detector creating different intensities in the image

• (b) An xray contrast medium has been injected into the aorta of the patient to highlight parts of interest

• (c) X-ray CAT scan (computerized axial tomography)

• (d) Industrial X-ray imaging for defect detection

• (e) Cynus Loop dust cloud

2011-08-30 12

Page 13: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Ultraviolet Imaging • Flourescence microscopy is a field of

miscroscope imaging where ultraviolet light is used to excite the electrons in a material causing them to flouresce (emit light). Some material flouresce naturally and flourescent chemicals can be applied to a sample

• (a) Miscroscope image of a healthy corn sample treated with flourescent chemicals

• (b) Corn infected by ”smut” disease

• (c) Cynus Loop dust cloud in the high energy ultraviolet band

2011-08-30 13

Page 14: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

• Remote sensing

Visible & Infrared Imaging

2011-08-30 14

Page 15: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

• Industrial Imaging

• Automated visual inspection of manufactured goods

Visible & Infrared Imaging

2011-08-30 15

Page 16: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

• Most common application is radar

• Some radar waves can penetrate clouds and even see through ice (martian polar ice), vegetation or dry sand (sahara desert).

• Imaging radar is an active illumination technique (like a camera with a flash)

• Spaceborne radar can see through clouds and take hi resolution images of the land.

• Consider NASAs detailed radar imaging of Venus which is permanently shrounded in sulfuric acid clouds

Imaging in the Microwave Band

2011-08-30 16

Image courtesy of JPL

Page 17: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

• Magnetic resonance imaging - Pulsed radio waves pass through the patient, radio pulses emminate from the patients body. Complex algorithms determine the source location and strength of these emminations reconstructing a picture of the patients body part.

• Crab Pulsar – naturally emitting source of radio waves

Imaging in the Radio Band

2011-08-30 17

Page 18: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

• Sound

• Ultrasound (medical imaging)

• Siesmic imaging (oil and gas exploration)

• Electron miscroscopy

Imaging from other sources

2011-08-30 18

Page 19: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E Industrial Image Analysis 19

Visible Light

• Visible Light is the part of the electromagnetic spectrum that causes a reaction in our visual systems

• Generally these are wavelengths in the range of about 350-750 nm (nanometers)

• Long wavelengths appear as reds and short wavelengths as blues

Page 20: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Three-Color Theory

Human visual system has two types of sensors

• Rods: grayscale, highly sensitive to intensity, superior at night & peripheral vision

• Cones

- Color sensitive

- Three types of cone

- Only three values (the tristimulus values) are sent to the brain

Need only match these three values

• Need only three primary colors

Speaking Notes

• Initial processing of light in most optical systems is based on the human visual system, however, the human visual system has a back end far more complex than any camera.

• The optic nerves are connected to the rods and cones in an extremely complex arrangement with many of the characteristics of a sophisticated signal processor.

• The sensors in the eye do not react uniformly to light energy of different wavelengths (colors)

• Define intensity as the physical measure of light energy

• Define brightness as the measure of how intense we percieve the light to be.

2011-08-30 20

Page 21: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Color Perception http://en.wikipedia.org/wiki/Color_perception

• Cone cells in the human eye.

• We are most sensitive to green light where all the ranges overlap

• However, red light stimulates almost exclusively L-cones, and blue light almost exclusively S-cones.

Cone

Type

Range

(nm)

Peak

Wavelength

S (blue) 400..500 420-440 nm

M (green) 450..630 534-545 nm

L (red) 500..700 564-580 nm

2011-08-30 E0005E Industrial Image Analysis 21

Image: WikiCommons

Page 22: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 22

Digital recording medium

• CCD Charged-Coupled Device

• Bayer mask

Page 23: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 23

Color and monochromatic representation

• Chromatic light (color)

• Monochromatic light

Prism White light

Intensity of red light

Intensity of green light

Intensity of blue light

White light Intensity of white

light (or grey level)

Page 24: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

What is a photographic digital image

• Grid of elements (pixels)

• Each element has a color

• Each color is represented by a number

Page 25: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

What is a photographic digital image

• Grid of elements (pixels)

• The image (grid) has a number of rows, and a number of columns

• We identify each pixel by specifying its position (i,j) in the image using a row number i, and a column number j

column j

row i

Page 26: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 26

Digital image acquisition process

Page 27: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 27

Image sampling and quantization

Page 28: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 28

Image sampling and quantization

Page 29: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 29

Spatial Resolution (Sampling)

• Spatial resolution is a measure of the smallest perceptible detail in an image

- Dots per unit distance

- Dots per inch (DPI)

• 20-megapixel camera can be expected to have better imaging capabilities than a 8-megapixel camera.

• But, size of image does not tell complete story.

Page 30: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 30

Spatial Resolution

Page 31: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 31

Intensity Resolution (Quantization)

• Intensity resolution is a measure of the smallest perceptible change in intensity level in an image

- Integer power of two

- 8 bits often used (256 gray levels)

• ‘Smallest perceptible change’

- Not how the human percieve

- Statement on how the intensity is quantized.

Page 32: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 32

Image sampling and Quantization

Page 33: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 33

Intensity Resolution (Quantization)

Page 34: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 34

A few operations

• We will go through

- Point operations

- Histogram calculation

- Contrast stretching

- Thresholdning

Page 35: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 35

Point operations

• A point operation is an operation where the gray level gi at a certain pixel (i,j) is replaced with a new gray level go according to some mapping go = F(gi)

(i,j)

gi = I(i,j)

go = F(gi)

I(i,j) = go

Page 36: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 36

Point operations

• Point operations is implemented as a Look Up Table

- If the mapping F(g) is independent of pixel position

2 9 0 1

0 7 4 3

9 8 1 6

3 0 6 2

Original image New image

Look Up Table

0 2 4 8 16 16 16 16 32 64

0 1 2 3 4 5 6 7 8 9

Page 37: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 37

Histogram calculation

• The histogram of a digital image with intensity levels in the range [0,L-1] is a discrete function

h(rk) = nk

rk - is the kth intensity value

nk - is the number of pixels in the image with intensity rk

• Commonly normalized

p(rk) = nk / NM

Page 38: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 38

Histogram calculation

Page 39: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 39

Histogram calculation

Page 40: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 40

Contrast stretching

• Piecewise-Linear Transformation

- Can design complex transformation functions

• The shape of the transformation

- Controlled by (r1,s1) and (r2,s2)

• Typical transformation for

contrast stretching

Page 41: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 41

Contrast stretching, an example

Page 42: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 42

Contrast stretching, an example

Page 43: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

2011-08-30 E0005E, Digital images 43

Thresholding

• Creates a binary image

• Useful for identifying objects in images - Calculate size, shape etc.

• Study the histogram to find appropriate threshold values

Page 44: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Reading

• Digital Image Processing (Third Edition) Gonzalez and Woods

- Ch 1

- Ch2 2.1-2.5

2011-08-30 E0005E Industrial Image Analysis 44

Page 45: 2011-08-30 E0005E Industrial Image Analysis 1 › cms_fs › 1.36192! › file › E0005E_Lecture1_Digital… · - login and go to the course room E0005E Industrial Image Analysis

Summing Up

• Consider the following three questions;

- What do I need to work on?

- What have I learnt today?

- What was the main point left unanswered today?

• Write your answers in the provided journal. Write the lecture number 1 on top of the page. Write your name and student number on the back of the book

2011-08-30 E0005E Industrial Image Analysis 45