n=m=30 what is an image? image is a 2d rectilinear array of pixels (picture element) n=m=256 f(x,y):...
TRANSCRIPT
![Page 1: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/1.jpg)
N=M=30
What is an image?
Image is a 2D rectilinear array of pixels (picture element)N=M=256
f(x,y):2
![Page 2: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/2.jpg)
L=15(4 bits)L=255 (8 bits)
What is an image?No continuous values - Quantization
[ , ] :[1, ] [1, ] [0, ]f x y N M L
255
170
15
8
L=1 (1 bit) L=3 (2 bits)
![Page 3: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/3.jpg)
An image is just 2D?No! – It can be in any dimensionExample 3D:
Voxel-Volume Element
![Page 4: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/4.jpg)
An image is just 2D?No! – It can be in any dimensionAn image is a n-dimensional rectilinear array of elements
1 2[ ] :[1, ] [1, ] ...[1, ] [0, ]nf x N N N L
[ ] :[1, ] [0, ]nf x N L
f x: n
![Page 5: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/5.jpg)
Does an image just map to scalars?
[ ] :[1, ] [1, ]n nf x N Lf x: n n
![Page 6: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/6.jpg)
Roy van Pelt, PhD & Anna Vilanova, PhDTU/e Biomedical Image Analysis Group, 2012
![Page 7: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/7.jpg)
Sampling and Quantization
• Sampling is digitizing the coordinate values of our function, e.g., f(x,y).
• Quantization is digitizing the amplitude values.
• In practice the sampling and quantization depend on the sensor arrangement that does the measurements.
![Page 8: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/8.jpg)
A B
![Page 9: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/9.jpg)
Digital vs Continuous Image
mm(11.25,11.25) [5,5]f f ( , ) [ , ]f i x j y f i j
Is the distance in mm between samples in x direction
is the distance in mm between samples in y direction
x
yy
xy
x
Spatial resolution defines the smallest spatial change that we will be able to distinguish, in spatial units!
Measures for that are dots per unit distance dpi, e.g., (dots per inch).
![Page 10: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/10.jpg)
Contrast
• Dynamic range is lowest and highest intensity level that an image shows
• Contrast is the difference in intensity between the highest and the lowest level.
• High Dynamic range implies high contrast• Intensity resolution smallest discernible change in
intensity level. – Usually integer power of 2, measured by number of bits.– Whether you can distinguish all levels or not depends on
human perception.
![Page 11: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/11.jpg)
False Contouring
![Page 12: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/12.jpg)
Image Interpolation
• We use the data we know to estimate the values in unknown positions.
x
( )f x [ ] ( ) ( )f i f x f x
x?
![Page 13: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/13.jpg)
Image Interpolation–Nearest Neighbour
• We use the data we know to estimate the values in unknown positions.
x
( )f x [ ] ( ) ( )f i f x f x
? x
0.5 [ ]( )
[ 1]
xi
x
xi f i
f x xf i
else
![Page 14: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/14.jpg)
Example How does it work in 2D?
![Page 15: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/15.jpg)
Image Interpolation – Linear Interpolation
• We use the data we know to estimate the values in unknown positions.
x
( )f x [ ] ( ) ( )f i f x f x
?
( ) (1 ) 1
x x i xi t
x x
f x f i t f i t
x
![Page 16: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/16.jpg)
ExampleHow does it work in 2D?
![Page 17: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/17.jpg)
Interpolation
• There are other methods for interpolation of higher order. Meaning more neighbors are involved and more complex curves are fitted.
![Page 18: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/18.jpg)
Transformations
![Page 19: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/19.jpg)
19
Motivation
How can we transform images?Apply transformation to all pixelsFirst do translation, then rotation, then scaling
tSRvv
![Page 20: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/20.jpg)
20
Motivation
• Transformation in 2D
• Transformation using homogenous coordinatestSRvv
110012221
1211
y
x
taa
taa
y
x
y
x
![Page 21: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/21.jpg)
21
Homogenous coordinates
• Allow to manipulate n-dim vectors in a n+1-dim space
• A point p can be written as vector • In homogenous coordinates we add a scaling factor
• To transform the homogenous coordinates in normal coordinate, divide by the n+1 coordinate.
y
xp
1
y
x
w
wy
wx
ph
![Page 22: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/22.jpg)
22
Homogenous coordinates
• we note
• Proof:
11
:, y
x
by
x
aba
1/
/
/
1
y
x
aa
aay
aax
a
ay
ax
y
x
a
![Page 23: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/23.jpg)
23
Translation
• Classic • Homogenous coordinates
y
x
tyy
txx
12
12
1
1
1
100
10
01
1
2
2
y
x
ty
tx
y
x
![Page 24: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/24.jpg)
24
Rotation (clockwise)
• Classic • Homogenous coordinates
1)cos(1)sin(
1)sin(1)cos(
2
2
yaxay
yaxax
1
1
1
100
0)cos()sin(
0)sin()cos(
1
2
2
y
x
aa
aa
y
x
![Page 25: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/25.jpg)
25
Translation and rotation
• Classic • Homogenous coordinates
tyyaxay
txyaxax
1)cos(1)sin(
1)sin(1)cos(
2
2
1
1
1
100
)cos()sin(
)sin()cos(
1
2
2
y
x
tyaa
txaa
y
x
![Page 26: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/26.jpg)
26
Translation, rotation and scaling
• Classic • Homogenous coordinates
tyyasyxasxy
txyasyxasxx
1)cos(1)sin(
1)sin(1)cos(
2
2
1
1
1
100
)cos()sin(
)sin()cos(
1
2
2
y
x
tyasyasx
txasyasx
y
x
![Page 27: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/27.jpg)
Affine Transformation
x2
y2
1
a11 a12 tx
a21 a22 ty
0 0 1
x1
y1
1
A transformation that preserves lines and parallelism (maps parallel lines to parallel lines) is an affine transformation.
![Page 28: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/28.jpg)
• Demonstration
![Page 29: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/29.jpg)
29
Rigid Transformations in 3d
• Around x-axis (counter-clockwise)
• Around y-axis• Around z-axis
• General
Rx (a)
1 0 0 0
0 cos(a) sin(a) 0
0 sin(a) cos(a) 0
0 0 0 1
Ry (b)
cos(b) 0 sin(b) 0
0 1 0 0
sin(b) 0 cos(b) 0
0 0 0 1
Rz(c)
cos(c) sin(c) 0 0
sin(c) cos(c) 0 0
0 0 1 0
0 0 0 1
T R
tx
ty
tz0 0 0 1
,R Rz(c)Ry (b)Rx (a)
![Page 30: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/30.jpg)
30
Image transformation
For each position Pd in the destination image we searchthe pixel color I(Pd).
Source image Destination image
Tsd
![Page 31: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/31.jpg)
31
Image transformation
First we compute a position Ps in the source image.
Source image Destination image
Tsd
1100
)cos()sin(
)sin()cos(
1d
d
yyx
xyx
s
s
y
x
tasas
tasas
y
x
![Page 32: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/32.jpg)
32
Image transformation
• P is not integer.• How do we compute I(Pd)=I(Ps)?• Answer: by interpolation
Ps0 Ps1
Ps3Ps2
Ps
Pd
Tsd
![Page 33: N=M=30 What is an image? Image is a 2D rectilinear array of pixels (picture element) N=M=256 f(x,y): 2](https://reader030.vdocuments.us/reader030/viewer/2022012922/56649e2c5503460f94b1ad2d/html5/thumbnails/33.jpg)
• Demonstration