Computer Vision Algumas Propriedades Importantes da Transformada de Fourier Paulo Sérgio Rodrigues PEL205 Computer Vision Separabilidade • Lembrando o par de Transformadas de Fourier 1 M 1 N 1  j 2 ux / M  vy / N    F u, v   f x , y e  MN x0 y 0 M 1 N 1 f x, y    F u, v e u 0 v 0 j 2 ux / M  vy / N  Computer Vision Separabilidade • Ou, considerando M = N para simplificar ainda mais: 1 N 1 N 1 F u, v    f x, y e  j 2 (ux vy) / N N x 0 y 0 N 1 N 1 f x, y    F u, v e u 0 v 0 j 2 ( ux  vy ) / N Computer Vision Separabilidade • Expandindo e arrumando: 1 N 1 N 1  j 2 ( ux  vy ) / N F u, v    f x, y e N x 0 y 0 1 N 1 N 1  j 2ux / N  j 2vy / N F u, v    f x, y e e N x 0 y 0 1 N 1  j 2ux / N N 1  j 2vy / N F u, v    e f x, y e  N x 0 y 0 Computer Vision Separabilidade • Da mesma forma, para a transformada inversa: 1 N 1  j 2ux / N N 1  j 2vy / N   F u, v    e f x , y e  N x 0 y 0 1 N 1 j 2ux / N N 1 j 2vy / N f x, y    e F u, v e  N u 0 v 0 Computer Vision Separabilidade • Pode-se ver cada parte como uma transformada 1D 1 N 1  j 2ux / N N 1  j 2vy / N   F u, v    e f x , y e  N x 0 y 0  1 N 1   j 2vy / N F ( x, v )  N   f ( x , y ) e   N y 0  Computer Vision Separabilidade • Pode-se ver cada parte como uma transformada 1D  1 N 1   j 2vy / N F ( x, v )  N   f ( x , y ) e   N y 0  N 1 1  j 2ux / N F (u, v)   F ( x, v)e N x 0 Computer Vision Translação Um “problema” para visualizar o espectro de Fourier de Uma função f(x,y) é o fato do pico mais alto ocorrer no eixo x = 0 Computer Vision Translação No caso de uma imagem f(x,y), a qualidade da visualização Pode ficar comprometida f(x,y) |F(u,v)| Computer Vision Translação No entanto, pode-se provar que, para constantes u0, v0, x0, y0: f ( x, y)e j 2 u0 xv0 y / N  F (u  u0 , v  v0 ) e f ( x  x0 , y  y0 )  F (u, v)e  j 2 ux0 vy0 / N Computer Vision Translação Mas, quando M = N e u0 = v0 = N/2 : e j 2 u0 xv0 y / N  e N N  j 2  x  y  / N 2  2  e j  x y  (1) como e  cos y  j seny  e jy j  1 (2) Substituindo (2) em (1), concluímos que: e j 2 ( u0 x v0 y ) / N  (1)  x y  Computer Vision Translação Finalmente, baseado nos resultados dos slides 10 e 11: f ( x, y)e j 2 u0 x v0 y   F (u  u0 , v  v0 ) se u0  v0  N / 2 f ( x, y)(1) x y   F (u  N / 2, v  N / 2) Conclusão: Para se deslocar o espectro de Fourier para o centro do sistema de coordenadas, basta multiplicar cada ponto (x,y) de sua inversa por -1 elevado a soma x + y Computer Vision Translação No caso de uma imagem f(x,y), a qualidade da visualização é claramente melhor |F(u,v)| sem Shift f(x,y)  f x, y    f x, y (1) x y   |F(u,v)| com Shift Computer Vision Periodicidade e Simetria Conjugada A transformada de Fourier é periódica de período N; isto é: F (u, v)  F (u  N , v)  F (u, v  N )  F (u  N , v  N ) isso pode ser provadoatravésde substituição direta de u  N e v  N em 1 N 1 N 1  j 2 ux  vy  / N F (u, v)   f ( x, y)e N x 0 y 0 Computer Vision Rotação Se introduzirmos coordenadas polares: x  r cos y  rsen u   cos v   sen f ( x, y) e F (u, v) se tornam: f (r , ) e F (,  ) Substituindo diretamente em f(x,y) e F(u,v), temos: f (r,  0 )  F (,  0 ) Computer Vision Rotação Exemplo de Rotação Computer Vision Distributividade Uma vez que:  f1 ( x, y)  f 2 ( x, y)   f1 ( x, y)  f 2 ( x, y) A transformada de Fourier é DISTRIBUTIVA sobre ADIÇÃO Mas ...  f1 ( x, y) f 2 ( x, y)   f1 ( x, y) f 2 ( x, y) A transformada de Fourier NÃO é DISTRIBUTIVA sobre MULTIPLICAÇÃO Computer Vision Escala Para dois escalares a e b af x, y   aFu, v  1 f ax  by  F u / a, v / b ab Computer Vision Valor Médio f x, y   N 1 N 1 1 N2  f x, y  x 0 y 0 fazendo u  v  0 em 1 N 1 N 1 F u, v    f x, y e j 2 ux vy / N  N x 0 y 0 1 F 0,0  N N 1 N 1  f x, y  x 0 y 0 Computer Vision Valor Médio 1 F 0,0  N f x, y   N 1 N 1  f x, y  x 0 y 0 N 1 N 1 1 N2  f x, y  x 0 y 0 1 f  x, y   F 0,0 N Computer Vision Transformada do Delta de Dirac f(x)  F ( w)    ( x)e i 2wx dx  e0  1 (x)  x || F(w) || 1 w Computer Vision Pares importantes Computer Vision Propriedades da transformada Computer Vision Descritores de Fourier Computer Vision Descritores de Fourier Computer Vision Descritores de Fourier