transformação de imagens
DESCRIPTION
Transformação de Imagens. Paulo Sérgio Rodrigues PEL205. Introdução a Transformada de Fourier. Chama-se série trigonométrica, uma série da forma:. Séries de Fourier. Séries de Fourier. As constantes a 0, a k e b k (1,2,...) são os coeficientes da série trigonométrica. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/1.jpg)
ComputerVision
Transformação de Imagens
Paulo Sérgio RodriguesPEL205
![Page 2: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/2.jpg)
ComputerVision Introdução a Transformada de Fourier
![Page 3: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/3.jpg)
ComputerVision Séries de Fourier
Chama-se série trigonométrica, uma série da forma:
)2()2cos()()cos(2 2211
0 xsenbxaxsenbxaa
1
0 )()cos(2 k
kk kxsenbkxaa
![Page 4: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/4.jpg)
ComputerVision Séries de Fourier
1
0 )()cos(2 k
kk kxsenbkxaa
As constantes a0, ak e bk (1,2,...) são os coeficientes da sérietrigonométrica
Se essa série trigonométrica convergir, a sua soma é uma função periódica f(x) de período 2π, dado que sen(kx) e cos(kx) são funções periódicas de período 2π. De modo que:
f(x) = f(x + 2π)
![Page 5: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/5.jpg)
ComputerVision Séries de Fourier
•Problema: para uma função periódica f(x) de período 2π, quais as condições impostas a f(x) de modo que exista uma sérietrigonométrica convergente para f(x)?
f(x)
1
0 )()cos(2
)(k
kk kxsenbkxaa
xf
![Page 6: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/6.jpg)
ComputerVision Séries de Fourier
1
0 )()cos(2
)(k
kk kxsenbkxaa
xf
A série acima pode ser então integrável de –π a π.
1
0 cos2
)(k
kk dxkxsenbdxkxadxa
dxxf
![Page 7: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/7.jpg)
ComputerVision Séries de Fourier
1
0 cos2
)(k
kk dxkxsenbdxkxadxa
dxxf
0
cos
0coscos
2 00
k
kxbdxkxsenbdxkxsenb
k
kxsenadxkxadxkxa
adxa
kkk
kkk
0
![Page 8: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/8.jpg)
ComputerVision Séries de Fourier
1
0 cos2
)(k
kk dxkxsenbdxkxadxa
dxxf
dxxfa
adxa
)(1
2
0
00
Agora só falta de determinar ak e bk !!
![Page 9: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/9.jpg)
ComputerVision Séries de Fourier
1
0 )()cos(2
)(k
kk kxsenbkxaa
xf
Multipliquemos os dois membros da equação acima por cos(nx)
1
0 cos)(cos)cos(cos2
cos)(k
kk nxkxsenbnxkxanxa
nxxf
![Page 10: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/10.jpg)
ComputerVision Séries de Fourier
1
0 cos)(cos)cos(cos2
cos)(k
kk nxkxsenbnxkxanxa
nxxf
No entanto, sabemos que:
Zkndxkxdxnxsenkx
, ,cos e 0cos 2
1
0 coscoscoscos2
cos)(k
kk dxnxkxsenbdxnxkxadxnxa
dxnxxf
Integrando de –π a π termo a termo ambos os membros da equação acima
![Page 11: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/11.jpg)
ComputerVision Séries de Fourier
1
0 coscoscoscos2
cos)(k
kk dxnxkxsenbdxnxkxadxnxa
dxnxxf
Zkndxkxdxnxsenkx
, ,cos e 0cos 2
Lembrando que:
0 0
kk adxkxadxkxxf
2coscos)(
dxkxxfak cos)(
1
![Page 12: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/12.jpg)
ComputerVision Séries de Fourier
1
0 coscoscoscos2
cos)(k
kk dxnxkxsenbdxnxkxadxnxa
dxnxxf
dxkxxfak cos)(
1
De maneira análoga, multiplicando a equação acima por sen(nx) aoinvés de cos(nx), chegamos a:
dxkxsenxfbk )(
1
dxxfa )(
10
que se junta a:
![Page 13: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/13.jpg)
ComputerVision Séries de Fourier
dxkxxfak cos)(
1
dxkxsenxfbk )(
1
dxxfa )(
10
1
0 )()cos(2
)(k
kk kxsenbkxaa
xf
![Page 14: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/14.jpg)
ComputerVision Série de Fourier
)2
sin2
cos(2)(1
0 T
ktb
T
ktaatf k
kk
t
f(t)
0T
Jean Baptiste Joseph Fourier (1768-1830) Paper de 1807 para o Institut de France: Joseph Louis Lagrange (1736-1813), and Pierre Simon de Laplace (1749-1827).
![Page 15: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/15.jpg)
ComputerVision Coeficientes da Série
)2
sin2
cos(2)(1
0 T
ktb
T
ktaatf k
kk
T
k kdtT
kttf
Ta
0,...3,2,1,0)
2cos()(
1
T
k kdtT
kttf
Tb
0,...3,2,1)
2sin()(
1
t
f(t)
0 T
![Page 16: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/16.jpg)
ComputerVision
Série de Fourier com números complexos
10
2sin
2cos2)(
knk T
ktb
T
ktaatf
2cos
ii ee
i
ee ii
2sin
1
22
0)(k
T
kti
kT
kti
k eFeFFtf
kkkkkk ibaFibaFaF ,,00
k
T
kti
keFtf2
)(
kk FF
1
2222
0)(k
T
kti
T
kti
kT
kti
T
kti
k eei
beeaatf
1
22
0)(k
T
kti
kk
T
kti
kk e
i
bae
i
baatf
T
T
kti
k kdtetfT
F0
)2
(,...3,2,1)(
1
i
12i
ii
i
1
![Page 17: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/17.jpg)
ComputerVision Transformada de Fourier
dwewFxf wxi 2)()(
dxexfwF wxi 2)()(
![Page 18: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/18.jpg)
ComputerVision
dxexfuFxf uxj 2
1 jonde
dueuFxfuF uxj 21
Transformada de Fourier (outra notação)
![Page 19: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/19.jpg)
ComputerVision
Introdução a Transformada de Fourier
uIuRuFuP 222
![Page 20: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/20.jpg)
ComputerVision
Introdução a Transformada de Fourier
dxdyeyxfvuFyxf vyuxj 2,,,
dudvevuFyxfvuF vyuxj 21 ,,,
![Page 21: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/21.jpg)
ComputerVision
Introdução a Transformada de Fourier
vuIvuRvuFvuP ,,,, 222
![Page 22: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/22.jpg)
ComputerVision Introdução a Transformada de Fourier
vuIvuRvuFvuP ,,,, 222
![Page 23: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/23.jpg)
ComputerVision Transformada Discreta de Fourier
xNxfxxfxxfxf 1,,2,, 0000
1
0
/21 N
x
NujexfN
uF
1
0
/2N
u
NujeuFxf
![Page 24: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/24.jpg)
ComputerVision Transformada Discreta de Fourier
xNxfxxfxxfxf 1,,2,, 0000
1
0
1
0
//2,1
,M
x
N
y
NvyMuxjeyxfMN
vuF
1
0
1
0
//2,,M
u
N
v
NvyMuxjevuFyxf
![Page 25: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/25.jpg)
ComputerVision
Resultados daTransformada de Fourier
![Page 26: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/26.jpg)
ComputerVision Exemplo 1: Função caixa (box)
f(x)
x
]2,
20
2[
20
)( b
bxse
bxsea
bxse
xf
a
dxexfwF wxi 2)()(
2/
2/2
2
b
bwxie
wi
a
2/
2/
2b
b
wxi dxea
wbiwbi eewi
a
2
i
ee
w
a wbiwbi
2
)sin( wb
w
a
b
wb
wbabwF
)sin(
)(
![Page 27: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/27.jpg)
ComputerVision Transformada da função box
bw
bwabwF
)sin(
)(
F(w)
0 1/b 2/b 3/b-1/b-2/b-3/b
ab
w
sinc(bw)
wb
wbabwF
)sin(
)( f(x)
x
a
b
![Page 28: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/28.jpg)
ComputerVision Distribuição normal: Gaussiana
2
2
22
1)(
x
exGaus
![Page 29: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/29.jpg)
ComputerVision Exemplo 2: Gaussiana
-0,02
0,03
0,08
0,13
0,18
-0,02
0,03
0,08
0,13
0,18
2
2
2
2
1)(
x
exf
2
2
12)(
w
ewF
f(x)
x
|| F(w) ||
w
1
![Page 30: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/30.jpg)
ComputerVision
Exemplos
Considere a função mostrada abaixo:
f(x)
2f(x0)
f(x0 + dx)
f(x0 + 2dx) f(x0 +3 dx)
x
3
4
0.5 0.75 1.0 1.25 x
f(x)=f(x + dx)
2
3
4
0.5 0.75 1.0 1.25
![Page 31: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/31.jpg)
ComputerVision Exemplos
1
0
/2)(1
)(N
x
NuxjexfN
uF
f(x) = [2, 3, 4, 4]
25.3)0(
25.3)4432(4
1)]3()2()1()0([
4
1
)(4
1)(
4
1)0(
3
0
03
0
02
F
ffff
exfexfFxx
j
![Page 32: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/32.jpg)
ComputerVision Exemplos
1
0
/2)(1
)(N
x
NuxjexfN
uF
f(x) = [2, 3, 4, 4]
)2(4
1)1(
)2(4
1]4432[
4
1
)(4
1)1(
2/32/0
3
0
4/2
jF
jeeee
exfF
jjj
x
xj
![Page 33: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/33.jpg)
ComputerVision Exemplos
1
0
/2)(1
)(N
x
NuxjexfN
uF
f(x) = [2, 3, 4, 4]
)2(4
1)3(
)01(4
1)2(
)2(4
1)1(
25.3)0(
jF
jF
jF
F
![Page 34: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/34.jpg)
ComputerVision Exemplos
F(u) = [3.25, -0.5+j0.25, -0.25, -0.5-0.25j]
4
5
4
1
4
2)3(
4
1
4
0
4
1)2(
4
5
4
1
4
2)1(
25.3)0(
2/122
2/122
2/122
F
F
F
F
![Page 35: Transformação de Imagens](https://reader036.vdocuments.pub/reader036/viewer/2022062407/56812bb2550346895d8ff043/html5/thumbnails/35.jpg)
ComputerVision
Ainda há muita Teoria pra falar sobre a Transformada de Fourier!
Mas já dá para brincar com imagens utilizando o com o MatLab!