Itä-Suomen yliopisto – tulevaisuuden yliopisto...

46
Computational color Lecture 1 Ville Heikkinen

Transcript of Itä-Suomen yliopisto – tulevaisuuden yliopisto...

Page 1: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Computational colorLecture 1

Ville Heikkinen

Page 2: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

1. Introduction

- Course context- Application examples (UEF research)

2

Page 3: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Standard lecture course:

- 2 lectures per week (see schedule from Weboodi)- exercises

Course page (available in Moodle soon…):

- lecture slides- exercises + data

3

Course

Page 4: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Color in image processing

4

Page 5: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Computations

Measurement devices produce data that are usually

represented with vectors, matrices, and tensors.

Efficient image analysis and processing usually requires

understanding of color/spectral data and suitable

computational methods.

5

Page 6: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Biometry, medical diagnosis, security

6

Is illumination same in all images?

Are images calibrated accurately?

Page 7: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Source of color data

In this course we assume that measurement devices

include

standard color imaging devices (e.g. in mobile phone)

and

spectral imaging devices

(multispectral- and hyperspectral cameras).

7

Page 8: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Color (trichromatic, RGB) imaging devices

8

Page 9: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Example: 3-dimensional vectors

(pixelwise RGB vectors corresponding to a digital color image)

9

Page 10: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Is color enough?Color representation

Surface reflectance (r)

Wavelength [nm]

10

Page 11: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

A simple spectral imaging system

11

Page 12: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

A complex spectral imaging system

12

Page 13: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Spectral image as a data structure

13

Page 14: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

14

Reflectance spectrum corresponding to a pixel

Page 15: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

15

Sampling

Page 16: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Images corresponding to spectral bands

16

Page 17: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Applications for spectral data and calibrated color

Biomedical imaging

Biometry and security

Color analysis, display, and printing

Cultural heritage imaging

Environmental monitoring

Industrial machine vision

17

Page 18: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

18

Course context: Color management and data analysis...

Page 19: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

19

...where the main phases are

1. Measurement

2. Processing

3. Accurate color representation

4. Data analysis (e.g. machine learning)

Page 20: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

The main topics in this course are:

1. Vector space formulations for colorimetry. Relation between spectral spaces and color spaces. Fundamental colorimetry

2. Estimation of standard color values from device responses

3. Estimation of spectral data from device responses

4. Representation of spectral data using subspaces

5. Implementation of computational models using MATLAB orsome other computational environment.

20

Course outline

Page 21: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Practical/project work

• Data + small analysis task

• Students write a report of obtained results. The reports are written as a form of (approx. 6 page) ”scientific publication” consisting of

• Abstract

• Introduction

• Methodology

• Experiments

• Discussion

• Conclusions

21

Page 22: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Example 1

Computational spectral imaging:

Increasing the availability of spectral data for common people (as well as for experts)

22

Page 23: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

A (real) hyperspectral imaging system (100k), UV-VIS-NIR

“A Wide Spectral Range Reflectance and Luminescence Imaging System”,T. Hirvonen et al., Sensors, Vol. 13(11), 14500-14510, 2013. 23

Page 24: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Properties of hyperspectral imaging

+ h• Narrow spectral bands• VIS, IR and UV• Estimation of reflectance information can be done easily by using

reference surfaces.

-• jCosts• Measurement speed (slow)• Light source properties (heat)• Spatial properties of obtained images• High-level of expertise• Practicality of measurement setting• Several systems are not mobile

24

Page 25: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

25“Spectral imaging using consumer-level devices and kernel-basedregression”, V. Heikkinen et al., Journal of the Optical Society of America A,Vol. 33(6), 2016.

Multispectral imaging system (1k) + mathematics + programming

-> Estimated hyperspectral image in visual wavelength range

Page 26: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Properties of multispectral imaging

+ h• Fast imaging (moving objects, video imaging)• Inexpensive (if based on RGB technique)• Large spatial resolution• Low demands for light source• Practical• RGB based systems are in standard use in several applications• Mobile

-• Estimation of reflectance information is not trivial• Possibly broad spectral bands.• Sensitivity of RGB-based system may be restricted to VIS region

26

Page 27: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Spectral images

visualized

as sRGB

Estimates

visualized

as sRGB

“Spectral imaging using consumer-level devices and kernel-basedregression”, V. Heikkinen et al., Journal of the Optical Society of America A,Vol. 33(6), 2016.

27

Page 28: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

28

Comparison of images using sRGB color representation

3 line scans (Specim V10) RGB + Laptop system usingDigital colorchecker in training Training data :

“Spectral imaging using consumer-level devices and kernel-basedregression”, V. Heikkinen et al., Journal of the Optical Society of America A,Vol. 33(6), 2016.

Page 29: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

29

Comparison of images using PCA eigenimages

3 line scans (Specim V10) RGB + Laptop system usingDigital colorchecker in training

3 line scans (Specim V10) RGB + Laptop system usingDigital colorchecker in training Training data :

Supplements for “Spectral imaging using consumer-level devices and kernel-based regression”, V. Heikkinen et al., Journal of the Optical Society ofAmerica A, Vol. 33(6), 2016.

Page 30: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

30

What kind of training data are needed for the imaging system?

3 line scans (Specim V10) RGB + Laptop system usingDigital colorchecker in training

“Spectral imaging using consumer-level devices and kernel-basedregression”, V. Heikkinen et al., Journal of the Optical Society of America A,Vol. 33(6), 2016.

Page 31: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

31

What kind of applications there are?

3 line scans (Specim V10) RGB + Laptop system usingDigital colorchecker in training

“Spectral imaging using consumer-level devices and kernel-basedregression”, V. Heikkinen et al., Journal of the Optical Society of America A,Vol. 33(6), 2016.

Page 32: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Example 2:

Spectral imaging as a tool for object analysis and sensor development

32

Page 33: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Hyperspectral imaging as tool for tree seeds screening

33

Line scan imaging in 400-2500 nm using two cameras.

Tree seeds in three classes

”Thermal and hyperspectral imaging for Norway spruce (Picea abies) seedsscreening”, J. Dumont, T. Hirvonen, V. Heikkinen et al., Computers andElectronics in Agriculture, Vol. 116, pp. 118-124 , 2015.

Page 34: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Hyperspectral imaging and feature extraction…

34

Line scan imaging in 400-2500 nm using two cameras.

Tree seeds in three classes

”Thermal and hyperspectral imaging for Norway spruce (Picea abies) seedsscreening”, J. Dumont, T. Hirvonen, V. Heikkinen et al., Computers andElectronics in Agriculture, Vol. 116, pp. 118-124 , 2015.

Page 35: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

…analyzing…feature selection…

35

Line scan imaging in 400-2500 nm using two cameras.

Tree seeds in three classes

”Thermal and hyperspectral imaging for Norway spruce (Picea abies) seedsscreening”, J. Dumont, T. Hirvonen, V. Heikkinen et al., Computers andElectronics in Agriculture, Vol. 116, pp. 118-124 , 2015.

Page 36: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

...and classifier construction with two indices

(based on three, narrow spectral bands)

36

Line scan imaging in 400-2500 nm using two cameras.

Tree seeds in three classes

”Thermal and hyperspectral imaging for Norway spruce (Picea abies) seedsscreening”, J. Dumont, T. Hirvonen, V. Heikkinen et al., Computers andElectronics in Agriculture, Vol. 116, pp. 118-124 , 2015.

Page 37: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

37

Example 3. Remote sensing of forest areas

A plot of pine treesin the ground

(10 m x 10 m area)

“Evaluation of simulated bands in airborne optical sensors for tree species identification”, P. Pant et al., Remote Sensing of Environment, Vol. 138, pp 27–37, 2013.

Page 38: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

38

Supervised classification of tree species in the ground

“Evaluation of simulated bands in airborne optical sensors for tree species identification”, P. Pant et al., Remote Sensing of Environment, Vol. 138, pp 27–37, 2013.

Page 39: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Example 4. Color calibration in remote sensing

Color characterization for aerial cameras. Susanne Scholz. Applied Geoinformatics for Society and Environment (AGSE) proceedings 2009. 39

Page 40: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Example 5.

Pigment mapping using

spectral reflectance data

(image segmentation)

40

Sensor changes in 1000 nm

Page 41: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Let vector V be a spectral measurement

(121-dimensional vector).

Task:

Find those pixels that have correlation

coefficient > 0.99 with the vector V.

Example: Segmentation of painting image

using correlation coefficient

41

Page 42: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

42

Page 43: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

43

Page 44: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

Task:

Find those pixels that have correlation

coefficient > 0.999 with the vector V.

44

Page 45: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

45

Page 46: Itä-Suomen yliopisto – tulevaisuuden yliopisto ajassacs.joensuu.fi/pages/heikkinen/cc_lecture1_2017.pdfLine scan imaging in 400-2500 nm using two cameras. Tree seeds in three classes

46