Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Procesamiento Local
PROCESAMIENTO DE IMÁGENES
• P. Local
∞
𝑓 ∗ 𝑔 𝑡 = න 𝑓 𝑖 . 𝑔 𝑡 − 𝑖 𝑑𝑖
−∞
𝑓 𝑛 ∗ 𝑔 𝑛 = 𝑓 𝑖 . 𝑔[𝑛 − 𝑖]
𝑖
PROCESAMIENTO LOCAL
0 𝑛 < −3
𝑓𝑛 = 𝑛 + 3 −3≤𝑛 <0
−𝑛 + 3 0≤𝑛≤3
0 𝑛>4
g 𝑛 = 𝑓[𝑛]
Convolución en 1d
MATLAB.
𝑤 = 𝑐𝑜𝑛𝑣(𝑢, 𝑣)
Convolución 2D
• P. local
𝑖=∞ 𝑗=∞
𝑓 𝑥, 𝑦 ∗ 𝑔 𝑥, 𝑦 = න න 𝑓 𝑖, 𝑗 . 𝐼 𝑥 − 𝑖, 𝑦 − 𝑗 𝑑𝑖𝑑𝑗
𝑖=−∞ 𝑗=−∞
f 𝑥, 𝑦 ∗ 𝑔 𝑥, 𝑦 = 𝑓 𝑛, 𝑚 . 𝐼[𝑥 − 𝑛, 𝑦 − 𝑚]
𝑛
Convolución de imágenes
digitales
𝑖=2 𝑗=2
𝑔 𝑥, 𝑦 ∗ 𝑓 𝑥, 𝑦 = 𝑓 𝑖, 𝑗 𝑔(𝑥 − 𝑖, 𝑦 − 𝑗)
𝑖=0 𝑗=0
𝑖=1 𝑗=1
𝑔 𝑥, 𝑦 ∗ 𝑓 𝑥, 𝑦 = 𝑓 𝑖, 𝑗 𝑔(𝑥 − 𝑖, 𝑦 − 𝑗)
𝑖=−1 𝑗=−1
Convolución de imágenes
digitales
• Mascara
𝑤0 𝑤1 𝑤2
• Ventana
• Filtro
𝑤3 𝑤4 𝑤5
• Kernel 𝑤6 𝑤7 𝑤8
Convolución de imágenes
digitales
Convolución de imágenes
digitales
1 1 1 2 7
1 1 1 1 8 3 2 1 1
ℎ= 1 1 1 𝐴= 1 3 9 2 1
9 1 2 2 3 1
1 1 1
1 1 1 2 1
Convolución 2d
x(j,i)
Convolución de imágenes
digitales
• Propiedades
• Conmutativa
𝑔 𝑥 =𝑓 𝑥 ∗ℎ 𝑥 =ℎ 𝑥 ∗𝑓 𝑥
• Asociativa
𝑔 𝑥 ∗𝑓 𝑥 ∗ℎ 𝑥 =𝑔 𝑥 𝑓 𝑥 ∗ℎ 𝑥
• Distributiva
𝑓 𝑥 ∗ ℎ 𝑥 +𝑔 𝑥 = 𝑓 𝑥 ∗ ℎ 𝑥 + 𝑓 𝑥 ∗ 𝑔(𝑥)
Correlación
Template Matching
Basado en diferencias
𝑇 𝑥, 𝑦 : 𝑇𝑒𝑚𝑝𝑙𝑎𝑡𝑒 𝑑𝑒 𝑡𝑎𝑚𝑎ñ𝑜 𝑆1 𝑥𝑆2
𝐼 𝑥, 𝑦 : 𝐼𝑚𝑎𝑔𝑒𝑛
𝑠1 𝑠1
𝑖 = − ……
2 2
𝑠2 𝑠2
𝑗 = − ……
2 2
𝑠 𝑠
𝑗= 22 𝑖= 22
2
𝑇𝑀𝐼,𝑇 𝑥, 𝑦 = 𝑇 𝑖, 𝑗 − 𝐼 𝑥 + 𝑖, 𝑦 + 𝑗
𝑠 𝑠
𝑗=− 22 𝑖=− 21
Template Matching
• Ejemplo:
Negro: O
Blanco: 255
Template:
𝑇(𝑥, 𝑦 )
Imagen:
𝐼(𝑥, 𝑦)
Template Matching
𝑠 𝑠
𝑗= 2 𝑖= 2
2 2
2
𝑇𝑀𝐼,𝑇 𝑥, 𝑦 = 𝑇 𝑖, 𝑗 − 𝐼 𝑥 + 𝑖, 𝑦 + 𝑗
𝑠 𝑠
𝑗=− 2 𝑖=− 1
2 2
0 19 39 58 78
38 53 68 83 97
Template Matching
𝑠 𝑠
𝑗= 2 𝑖= 2
2 2
2
𝑇𝑀𝐼,𝑇 𝑥, 𝑦 = 𝑇 𝑖, 𝑗 − 𝐼 𝑥 + 𝑖, 𝑦 + 𝑗
𝑠 𝑠
𝑗=− 2 𝑖=− 1
2 2 0 255
156
Template Matching
𝑠 𝑠
𝑗= 2 𝑖= 2
2 2
2
𝑇𝑀𝐼,𝑇 𝑥, 𝑦 = 𝑇 𝑖, 𝑗 − 𝐼 𝑥 + 𝑖, 𝑦 + 𝑗
𝑠 𝑠
𝑗=− 2 𝑖=− 1
2 2
97
Template Matching
Mínimo global
Ejemplo: con una escena real Diferencia
Template :
Imagen:
Mínimo
locales
Template Matching
Zona de mínimos
locales
Témplate de la
imagen