You are on page 1of 37

19/11/2017

Introduction
Basic concepts

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

IMAGES

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

1
19/11/2017

Images

Chemical Image Definition

A chemical image is any image that gives chemical information

Medical Image Definition

A medical image is any image that gives medical information

Image Definition

An image is a representation of the external form of an object

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Images

Images
Images are spatial (bi-dimensional) representations of an action or objects

The spatial dimensions are sub-divided by pixels

Every pixel is an entity (individual) that is influence:


- By its value
- By the values of the surrounding pixels

6 7 8 7 6
7 8.5 9 8.5 7
8 9 10 9 8
7 8.5 9 8.5 7
6 7 8 7 6

Where does that value come from?

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

2
19/11/2017

Images

Images
Images are spatial (bi-dimensional) representations of an action or objects

The spatial dimensions are sub-divided by pixels

Every pixel is an entity (individual) that is influence:


- By its value
- By the values of the surrounding pixels

Spatial Resolution

It is the length of the pixel IN BOTH SPATIAL DIRECTIONS

It is also important to consider the relative spatial resolution (area or length)

=
FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Images

Values on the pixels. Scientific information


Single channel images

Every pixel contains only one value

Usually ranged between limits

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

3
19/11/2017

Images

Values on the pixels. Scientific information


Color-space images. RGB images

Every pixel contains three values

Ranged between limits depending on the storage

The three values are combined to form real colors

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Images

Values on the pixels. Scientific information


Multi-band images. Multi-spectral images

Every pixel contains a discrete number of values usually higher than 4

The values come from different types of sources

The sources are usually discrete wavelengths

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

4
19/11/2017

Images

Values on the pixels. Scientific information


Hyperspectral images

Every pixel contains a important number of values. Usually a spectrum

The values usually come from the same spectral source

Spectral resolution: Separation between wavelengths

Multiband images are also hyperspectral images

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

RGB Images

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

5
19/11/2017

Red Green Blue images

The visible radiation (400 – 750 nm)


The only radiation that we can perceive

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Red Green Blue images

The visible radiation (400 – 750 nm)


The human eye is sensitive to visible light at different rates depending of
day/night radiation

Day vision (cone sensors) Night vision (rod sensors)

BLUE GREEN RED GREEN

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

6
19/11/2017

Red Green Blue images

Red, Green and Blue channels


Our digital cameras are based on human eye perception

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Red Green Blue images

Red, Green and Blue channels Blue


cyan

magenta

Green

Red yellow

GRAYSCALE

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

7
19/11/2017

Red Green Blue images

Red, Green and Blue channels Blue


cyan

magenta

Green

Red yellow
FALSE COLOR PICTURES
RED GREEN BLUE

Color = Intensity

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Red Green Blue images

Red, Green and Blue channels


Every channel contains a maximum of fixed amount of values

It depends on the precision of the numbers and the storage capability

8 bites pictures  28 levels per channel  256 levels  2563 = 16777216 colors

Pure red = [255 0 0]


Pure green = [0 255 0]
Pure blue = [0 0 255]

16 bites pictures  216 levels per channel  65536 levels  655363 colors

There are many other precisions. This is known as color depth

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

8
19/11/2017

Red Green Blue images

Other color spaces


There are many different ways of coding color

HSV (Hue – Saturation – value) and HSL (Hue – Saturation – Luminescence)

*Source: Wikipedia
FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Red Green Blue images

Other color spaces


There are many different ways of coding color

Lab (Luminosity – Red to Green – Blue gradient)

*Source: Wikipedia
FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

9
19/11/2017

Red Green Blue images

Other color spaces


There are many different ways of coding color

YCbCr (Luma – croma in blue – croma in red)

What is JPEG:

*Source: Wikipedia
FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Red Green Blue images

Some examples

Digital cameras
 High spatial resolution
 Problems with focal distance
 Problems with illumination

Flat-bed scanners
 High spatial resolution
 Fixed focal distance
 Fixed light source (tunable)

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

10
19/11/2017

Red Green Blue images

The data and the analysis


There are three channels of information

Their combinations are analyzed

C1 = R – G
C2 = R – B
C3 = G – B

Mostly based on the Digital Imaging methods

Example: Detecting specific areas on an image and measuring properties

Steak_example.m
Sevilla_flower_example.m

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

MULTISPECTRAL IMAGING

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

11
19/11/2017

Multispectral images

Multispectral images

Between RGB and Hyperspectral

Non-continuous spectrum
200
Specific spectral channels

Intensity (a.u.)
150

100

50
500 600 700 800 900

Wavelengths (nm.)

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Multispectral images

Multispectral technologies

Filter based cameras

Filter-based signals
Attenuation
Bandwidth

Easy to change the filters

From UV to NIR

Illumination issues

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

12
19/11/2017

Multispectral images

Multispectral technologies

Multi-objectives based cameras

Filter-based signals
Attenuation
Bandwidth

NOT easy to change the filters

Illumination issues

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Multispectral images

Multispectral technologies

LEDs based cameras


LED system Acquiring the image
Ultra Blue 430nm Chlorophyll A
Blue 450nm Riboflavin, Chlorophyll B, Beta-carotene
Blue 470nm RGB Blue
Blue Green 505nm RGB green, Metmyoglobin
Green 565nm Myoglobin
Yellow 590nm Oxymyoglobin
Red 630nm RGB red, Metmyoglobin (weak)
Red 645nm Chlorophyll B
Red 660nm Oxidation, Chlorophyll A
Red 700nm Oxidation
NIR 850nm Baseline
NIR 870nm Baseline
NIR 890nm Fat shoulder (un-saturation)
NIR 910nm Protein (C-H)
NIR 920nm Carbohydrate (C-H)
NIR 940nm Fat
VideometerLab® NIR 950nm Valley (Carbohydrate, protein)
NIR 970nm Water

Very fast measurements of 18 channels


High spatial resolution
We cannot talk about spectral resolution  Only 18 specific wavelengths
Food Chemistry

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

13
19/11/2017

Multispectral images

The data and the analysis

There might be many channels

Their combinations are analyzed

They are basically Hyperspectral Images, so they can be treated as such, with
several constraints in the spectral pre-processing

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Multispectral images

The data and the analysis

Common spectral indexes (Intensity at indicated nanometers)

Normalized difference vegetation (NDVI) = (800 - 640)/(800 + 640)

Green normalized difference vegetation (greenNDVI-I) = (550 - 640)/(550 + 640)


Green normalized difference vegetation (greenNDVI-II) = (800 - 550)/(800 + 550)

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

14
19/11/2017

Multispectral images

The data and the analysis

Common spectral indexes (Intensity at indicated nanometers)

Water band (WBI) = 950/900

Soil adjusted vegetation (SAVI) = ((800 – 649)*1.5)/(800 + 640 + 0.5)

Photochemical reflectance (PRI) = (531 - 570)/(531 + 570)

Red-edge vegetation stress (RVSI) = (714 + 752)/(2 – 733)

Modified chlorophyll absortion in reflectance


MCARI = [(700 - 670)-0.2*(700 - 550)]*(700/670)

Visible atmospherically resistant (VARI) = (550 - 640)/(550 + 640 - 4802)

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Multispectral images

The data and the analysis

Common spectral indexes (Intensity at indicated nanometers)

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

15
19/11/2017

Hyperspectral Imaging

API
Lactose

Lubricants

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Hyperspectral Imaging
Single spectrum for each x,y dimension
0.4

0.3
Absorbance

0.2

0.1
Types of radiations
0

-0.1
7000 6000 5000 4000
Wavenumber
y axis, N pixels

Single wavenumber image

Types of Measurements
x axis, M pixels

False color image

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

16
19/11/2017

Hyperspectral Imaging

Types of most common radiations in hyperspectral machinery

Visible region  400 – 750 nm Raman region  VIS-NIR

IR region  2500 - 50000nm / 4000 - 200 cm-1

NIR region  800 - 2500nm / 12500 - 4000 cm-1

Symmetrical Asymmetrical Bending


stretching stretching vibration
vibration vibration H-O-H
H-O-H H-O-H

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Hyperspectral Imaging

Types of measurements: Pixel To Pixel (whisker-broom) scan

interferometer
interferometer
interferometer λ

lamp
Y

X
Difuse
Difuse
Difuse
reflectance
reflectance
reflectance
White light

sample

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

17
19/11/2017

Hyperspectral Imaging

Types of measurements: Line (push-broom) scan

y y y y
Dispersing
Dispersing Dispersing
Dispersing λ
filterfilterfilterfilter

λ λ λ λ lamp
Y

X
slit slit slit slit

White light

Difuse
reflectance

sample

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Hyperspectral Imaging

Types of measurements: Plane scan. Global imaging

Focal plane Detector

Optics
lamp Y

x
Bandpass Filter (TF)

Difuse reflectance
White light

sample

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

18
19/11/2017

Hyperspectral Imaging

Types of measurements. The importance of illumination

Monochromator I
Sample
R
Source Detector I0

1 I ac
log  log 0 
R I s

Transmission Diffuse Reflection

I
T
I0

1 I
A  log  log 0  a  b  c
T I
FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Hyperspectral Imaging

Types of measurements. The importance of illumination

Contrast

Dark Field Co-axial Difuse (I) Difuse (II)


FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

19
19/11/2017

Hyperspectral Imaging

Types of measurements. The importance of illumination

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Hyperspectral Imaging

Some issues

Small pixel size


Big object size
Each pixel  mixed information
Penetration of the radiation
Illumination artifacts (shadows)

Depending on the slide*


Incident Diffusively
photons reflected
photons

Pixel size Pixel size

35% 28%
32% 42%

32% 28%

*Extracted from Image Analysis of Food Microstructure. John C. Russ. CRC PRESS. New York. 2005

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

20
19/11/2017

Hyperspectral Imaging

Some issues

It is mostly a SURFACE TECHNIQUE, Even though it penetrates a little

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

APPLICATIONS
(some)

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

21
19/11/2017

Some applications

MIR
Remote sensing
Forensics NIR NMR
Sorting Vis-NIR? Terahertz
Raman

Pharma Global Push-broom


Art Filters CCDs LEDs
Food

Quantitation
Resolution
Etc, etc, etc... Classification

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

SPECTROSCOPY  LINE MAPPING – CONVEYOR BELT CONCEPT

An example  Detection of sugar ends in potatoes

EC3 Chemical system (http://www.chemical-imaging.com/index.html)

REAL-TIME
CONTROL
OF QUALITY

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

22
19/11/2017

Some applications

SPECTROSCOPY  LINE MAPPING – CONVEYOR BELT CONCEPT

An example  Detection of sugar ends in potatoes

What are they doing here?

Fulfilled Quality parameters

GOO
D
Quality

BAD

Not fulfilled Quality parameters

Time or potatoe

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

SPECTROSCOPY  LINE MAPPING – CONVEYOR BELT CONCEPT

An example  Detection of sugar ends in potatoes

What are they doing here?

1) Data acquisition

2) Data pre-processing (handling of issues)

Calibration
3) Classification model (maybe PLS-DA) Internal validation
Prediction

4) Real time implementation + maintenance of the model

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

23
19/11/2017

Some applications

SPECTROSCOPY  LINE MAPPING – CONVEYOR BELT CONCEPT

An example  Detection of sugar ends in potatoes

What are they doing here?

1) Data acquisition

2) Data pre-processing (handling of issues)

CHEMOMETRICS
3) Classification model (maybe PLS-DA)
Calibration
Internal validation
Prediction

4) Real time implementation + maintenance of the model

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

SPECTROSCOPY  LINE MAPPING – CONVEYOR BELT CONCEPT

An example  Detection of sugar ends in potatoes


FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

24
19/11/2017

Some applications

SPECTROSCOPY  LINE MAPPING – CONVEYOR BELT CONCEPT

An example  Detection of sugar ends in potatoes

EC3 Chemical system (http://www.chemical-imaging.com/index.html)

REAL-TIME
CONTROL OF
QUALITY

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Plastic sorting
- automated / robotic sorting units
- new hyperspectral sensor systems
- waste management systems
- generic tool for product designers to optimize the
end-of-life product.

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

25
19/11/2017

Some applications

Plastic sorting

Global model

Flame retardants

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Plastic sorting
False color image of the samples Identification of the samples

ABS PA6 PP PP
0.15 REF 2.02 2.02
100
PBT PBT ABS PBT
0.10 REF 0.2 0.1
200
ABS PS PP PS
0.15 0.9 REF REF
300
ABS ABS PS PA6
REF REF 0.9 REF
400
PA6 PS PP ABS
0.10 0.0 REF 0.10
500
PS PBT PS PS
0.7 REF 0.7 REF
600
50 100 150 200

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

26
19/11/2017

Some applications

Plastic sorting

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Plastic sorting - Pellets are individuals 

INTEGRATION SURFACE RESOLUTION WITH


SPECTRAL RESOLUTION

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

27
19/11/2017

Some applications

Plastic sorting - Pellets are individuals 

INTEGRATION SURFACE RESOLUTION WITH


SPECTRAL RESOLUTION

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Pharmaceutical production

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

28
19/11/2017

Some applications

Pharmaceutical production

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Pharmaceutical production

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

29
19/11/2017

Some applications

Pharmaceutical production

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Forensics

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

30
19/11/2017

Some applications

Forensics

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Forensics

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

31
19/11/2017

Some applications

Food production

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Food production  Bread

50
2
100

150
1
200

250 0

300
-1

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

32
19/11/2017

Some applications

Food production  Blue berries

CLASS 3 – CLASS 4

19 diffuse wavelengths 365-970 nm LED’s

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Food production  Blue berries

CALIBRATION VALIDATION

error rate = 0.01 error rate = 0.00

explained variance = 98% accuracy = 1

class 1: Specificity = 0.99; Sensitivity = 0.99; Precision = 0.99 class 1: Specificity = 1; Sensitivity = 1; Precision = 1

class 2: Specificity = 0.99; Sensitivity = 0.99; Precision = 0.99 class 2: Specificity = 1; Sensitivity = 1; Precision = 1

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

33
19/11/2017

Some applications

Food production  Coffee

Arabica Robusta
AS tr. set
RS tr. set

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Confocal microscopy

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

34
19/11/2017

Some applications

Confocal microscopy

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

Remote sensing, precission agriculture

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

35
19/11/2017

Some applications

Post-harvesting

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

MIR
Remote sensing
Forensics NIR NMR
It is extremely difficult to define a general Vis-NIR?
frameworkTerahertz
on
Sorting
hyperspectral image analysis.
Raman
It is strongly dependent on the application:

DOING WHAT in WHERE


Pharma Global Push-broom
Art Filters CCDs LEDs
Food

Quantitation
Resolution
Etc, etc, etc... Classification

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

36
19/11/2017

Some applications

MIR
Remote sensing
Forensics NIR NMR
Sorting Vis-NIR? Terahertz
Raman

Pharma Global Push-broom


Art Filters CCDs LEDs
Food

Quantitation
Resolution
Etc, etc, etc... Classification

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

Some applications

MIR
Remote sensing
Forensics NIR NMR
Sorting Vis-NIR? Terahertz

BUY MY BOOK! Raman

Pharma Global Push-broom


Art Filters CCDs LEDs
Food

Quantitation
Resolution
Etc, etc, etc... Classification

FOOD, U. Copenhagen, Denmark. www.models.life.ku.dk www.hypertools.org jmar@life.ku.dk

37

You might also like