You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manifolds: "variedades" in spanish. ¿Qué son los manifolds? Desde una perspectiva geométrica, son las **formas**que la geometría diferencial estudia. Estas formas se caracteŕizan, de manera intuitiva, por que si no acercamos conun zoom lo suficientemne grande, es decir, en la localidad, se ven como un espacio Euclídeo ordinario. Por ejemplo, si hablamos de la superficie de la Tierra (un esferoide), estamos hablando (aproximadamente) de un manifold, pues en ella, a un nivel humano (i.e. local), no es difícil discernir bajo inspección vaga si estamos viiendo en un plano o en una superficie con vurvatura. La asunciónd e los manifolds nos permite trasladar muchas de las herramientas del mundo Euclídeo 2D a espcaios curvos,.
13
+
Manifolds: "variedades" in Spanish. What are manifolds? From a geometric perspective, they are the **shapes**that differential geometry studies. These shapes are intuitively characterized by the fact that if we zoom in sufficiently, that is, locally, they look like an ordinary Euclidean space. For example, if we talk about the surface of the Earth (a spheroid), we are (approximately) talking about a manifold, because at a human level (i.e., locally), it is not difficult to discern under vague inspection whether we are looking at a plane or a surface with curvature. The assumption of manifolds allows us to transfer many of the tools of the 2D Euclidean world to curved spaces.
14
14
15
-
COmo objeto matemático, los manifolds generalizan la noción de superficie curva en espacios de mayor dimensión; formalmente, se definen como espacios topológicos que localmente se parecen (en cierto sentido [1]) al espacio eculídeo R^n, pero globalmente puede tenre una estructura más compleja. UN manifold de dimensión n significa que localmente se comprta como R^n; por ejemplo,. uma linea (R¹) es un manifold 1D, una superficie como una esfera (R²) es un manifold 2D y el espacio en que vivimos (R³) es un maniofld 3D.
15
+
As a mathematical object, manifolds generalize the notion of a curved surface in higher-dimensional spaces; formally, they are defined as topological spaces that locally resemble (in a certain sense [1]) Euclidean space \( R^n\), but globally they may have a more complex structure. An \( n \)-dimensional manifold means that locally it behaves like \(R^n\); for example, a line (\( R^1 \)) is a 1D manifold, a surface like a sphere (\( R^2 \)) is a 2D manifold, and the space we live in (\( R^3 \)) is a 3D manifold.
16
16
17
-
Pero, en el contecto del aprendizahje automático y procesamiento de señales, los manifolds se usan para represetnar datos en espacios de alta dimesión de menra eficiente. Por ejemplo., lo spíxeles de una imagen puieden estar distributidos en un manifold dentro de un espacio de características más grande, lo que permite aplicar para la técnica de filtrado que presentaremos a continuación.
17
+
However, in the context of machine learning and signal processing, manifolds are used to efficiently represent data in high-dimensional spaces, as every "small regions" in the manifold can be mapped to a euclidean space. For example, the pixels of an image may be distributed in a manifold within a larger feature space, which enables the filtering technique we will present below.
18
+
19
+
In many machine learning problems, data resides on a manifold with a more complex structure than a conventional Euclidean space. For example, in biomechanics, joint movement follows geometric constraints that define a configuration space manifold. Similarly, in natural language processing, semantic relationships between words form curved spaces where distances are not linear but shaped by linguistic structure. Meshes, which represent 3D surfaces, and graphs, where distances are measured by edge traversal rather than straight lines, are also examples of non-Euclidean domains. Understanding the underlying geometry of these data structures enables more precise analysis and processing techniques.
20
+
21
+
The article in [3] presents a methodology for image mosaicing that overcomes the limitations of traditional methods, which use predetermined manifolds based on the type of camera motion. The proposal involves projecting strips of images onto manifolds adapted to the camera's movement, allowing mosaicing in more general situations, such as forward motion, overcoming the constraints of previous techniques. This post will build upon the work in [4], where they develop a high-dimensional image and video filtering technique in real-time, which accelerates the process by calculating the filter's response at a reduced set of points and then interpolating for all pixels. This approach allows the filtering cost to be linearly dependent on both the number of pixels and the dimension of the space in which the filter is applied. The technique is flexible, capable of approximating several types of standard filters, and even performing a hybrid Euclidean-geodesic filter in a single pass. Additionally, it is faster and requires less memory than previous methods, proving effective in tasks such as color filtering, noise reduction, and detail enhancement.
18
22
19
23
# Adaptive Manifold
20
24
21
-
Es archiconocido el hecho subyacente al párrafo anterior; las redes neuronales generan capas y capas de vectores de alta dimensión a partir de aplicar operaciones lineales y no lineales a los datos de entrada. EN este contexto, los datos pasan a ser representados en un sistema de coordenadas que mantiene una relación con el del espacio euclídeo original, pero que puede tener una estructura más compleja. Similarmente, los píxeles de una imagen no están distirbutidos de manera aleatoria, sino que tienden a organizarse en una estructura subyacente. Es posible entonces contruir un adaptive manifold de alta dimensión que funcione como una aproximación de la distribución de los píxeles en un espacio de (sus) caracteŕisticas.
25
+
The underlying fact mentioned in the previous paragraph is well known; neural networks generate layers upon layers of high-dimensional vectors by applying linear and nonlinear operations to input data. In this context, data are represented in a coordinate system that maintains a relationship with the original Euclidean space but may have a more complex structure. Similarly, the pixels of an image are not randomly distributed but tend to organize themselves into an underlying structure. It is then possible to construct a high-dimensional adaptive manifold that approximates the distribution of pixels in a (sub)feature space.
22
26
23
-
El método Adaptive Manifolds explota esta estructura para realizar un filtrado eficiente, preservando detalles y bordes sin los altos costos computacionales de otros enfoques, como el filtro bilateral, que operan directamente ne el "espcio euclídeo" de los píxeles. A través de una jerarquía de aproximaciones adaptativas, este método permite suavizar la imagen de manera selectiva, respetando las transiciones de intensidad importantes.
27
+
The Adaptive Manifolds method exploits this structure to perform efficient filtering, preserving details and edges without the high computational costs of other approaches, such as the bilateral filter, which operates directly in the "Euclidean space" of pixels. Through a hierarchy of adaptive approximations, this method allows selective smoothing of the image while respecting important intensity transitions.
24
28
25
-
## 1. **Construcción de la Variedad Adaptativa**
26
-
Como la idea principal es representar una imagen\(u(\mathbf{x})\)en un manifold adaptativo \(\mathcal{M}\), la manera en que podemos hacer que el manifodl sea adaptativo es construirlo a través de una media ponderada (aproximación adaptativa) de la imagen:
29
+
## 1. **Construction of the Adaptive Manifold**
30
+
Since the main idea is to represent an image\(u(\mathbf{x})\)on an adaptive manifold \(\mathcal{M}\), the way we can make the manifold adaptive is by constructing it through a weighted mean (adaptive approximation) of the image:
-**\( I(\mathbf{x}) \)**es el valor de la imagen en el píxel**\( \mathbf{x} \)**.
35
-
-**\( G_s(\mathbf{x} - \mathbf{y}) \)**es un filtro Gaussiano que suaviza la imagen en función de la distancia espacial entre los píxeles **\( \mathbf{x} \)**y**\( \mathbf{y} \)**. La desviación estándar**\( \sigma_s \)**controla el suavizado espacial.
36
-
-**\( w(\mathbf{y}) \)**es una función de peso que controla la influencia de cada píxel **\( \mathbf{y} \)**en la aproximación.
37
-
-**\( \Omega \)**es el dominio de la imagen.
38
+
-**\( I(\mathbf{x}) \)**is the image value at pixel**\( \mathbf{x} \)**.
39
+
-**\( G_s(\mathbf{x} - \mathbf{y}) \)**is a Gaussian filter that smooths the image based on the spatial distance between pixels **\( \mathbf{x} \)**and**\( \mathbf{y} \)**. The standard deviation**\( \sigma_s \)**controls spatial smoothing.
40
+
-**\( w(\mathbf{y}) \)**is a weight function that controls the influence of each pixel **\( \mathbf{y} \)**in the approximation.
41
+
-**\( \Omega \)**is the image domain.
38
42
39
-
Esta ecuación define una**media ponderada adaptativa**de la imagen, lo que permite que la imagen se suavice de manera que respete las transiciones de intensidad importantes, preservando bordes y detalles.
43
+
This equation defines an**adaptive weighted mean**of the image, which allows the image to be smoothed in a way that respects important intensity transitions, preserving edges and details.
40
44
41
-
## 2. **División en Máscaras Adaptativas**
45
+
## 2. **Segmentation into Adaptive Masks**
42
46
43
-
El siguiente paso en el filtro es dividir la imagen en dos regiones basadas en la comparación con la media adaptativa**\( m(\mathbf{x}) \)**. Esto se hace para permitir un tratamiento diferente de las áreas de la imagen según su relación con la intensidad media adaptativa.
47
+
The next step in the filter is to divide the image into two regions based on comparison with the adaptive mean**\( m(\mathbf{x}) \)**. This is done to allow different treatment of image areas according to their relationship with the adaptive mean intensity.
44
48
45
-
-**Máscara Baja**: La región donde los valores de la imagen son menores o iguales a la media adaptativa\( m(\mathbf{x}) \):
49
+
-**Low Mask**: The region where image values are less than or equal to the adaptive mean\( m(\mathbf{x}) \):
Esta segmentación permite tratar cada región de forma separada, lo que facilita la preservación de bordes en las transiciones de intensidad.
58
-
61
+
This segmentation allows each region to be treated separately, facilitating edge preservation in intensity transitions.
59
62
60
-
## 3. **Proyección en la Variedad Adaptativa**
63
+
## 3. **Projection onto the Adaptive Manifold**
61
64
62
-
Una vez que la imagen se ha segmentado en las regiones baja y alta, cada punto de la imagen se proyecta en la variedad adaptativa utilizando un peso basado en la diferencia de intensidad entre el píxel actual **\( I(\mathbf{x}) \)**y la media adaptativa**\( m(\mathbf{x}) \)**:
65
+
Once the image has been segmented into low and high regions, each point in the image is projected onto the adaptive manifold using a weight based on the intensity difference between the current pixel **\( I(\mathbf{x}) \)**and the adaptive mean**\( m(\mathbf{x}) \)**:
-**\( I_{\text{low}}(\mathbf{x}) \)**y**\( I_{\text{high}}(\mathbf{x}) \)**son los componentes filtrados en cada nivel.
90
-
-Se combinan los resultados de forma jerárquica.
91
+
-**\( I_{\text{low}}(\mathbf{x}) \)**and**\( I_{\text{high}}(\mathbf{x}) \)**are the filtered components at each level.
92
+
-The results are combined hierarchically.
91
93
92
-
Esta recursividad permite refinar el filtrado a medida que se realizan más iteraciones.
94
+
This recursion allows refining the filtering as more iterations are performed.
93
95
94
-
## 5. **Comparación con el Filtro Bilateral**
96
+
#Comparison with the Bilateral Filter
95
97
96
-
El filtro bilateral es otro método popular para suavizar imágenes mientras preserva los bordes. Sin embargo, el filtro bilateral es menos eficiente porque realiza el cálculo de la distancia en un espacio de mayor dimensión. La ecuación del filtro bilateral es la siguiente:
98
+
The bilateral filter is another popular method for smoothing images while preserving edges. However, the bilateral filter is less efficient because it calculates distances in a higher-dimensional space. The bilateral filter equation is:
-**\( G_c \)**es un filtro Gaussiano en el dominio espacial que atenúa los píxeles que están más alejados entre sí.
105
-
-**\( G_c \)**es un filtro Gaussiano en el dominio de intensidad, que suaviza las diferencias de intensidad.
106
+
-**\( G_c \)**is a Gaussian filter in the spatial domain that attenuates pixels that are farther apart.
107
+
-**\( G_c \)**is a Gaussian filter in the intensity domain, smoothing intensity differences.
106
108
107
-
La diferencia clave entre el filtro bilateral y el Adaptive Manifold Filter es que este último evita trabajar directamente en el espacio de alta dimensión de las intensidades de los píxeles. En cambio, utiliza una representación adaptativa de la imagen, lo que permite realizar el filtrado de manera más eficiente sin perder preservación de detalles y reduciendo los costos computacionales.
109
+
The key difference between the bilateral filter and the Adaptive Manifold Filter is that the latter avoids working directly in the high-dimensional intensity space of pixels. Instead, it uses an adaptive representation of the image, enabling more efficient filtering while preserving details and reducing computational costs.
108
110
109
-
Para sigma_s=5.0, sigma_c=0.1, añadiendo ruido Gaussiano N(0,0.05) Y Poisson A LA IMAGEN ORIGINAl, estos son los resultados de PSNR y tiempo de ejecución:
111
+
To maintain a common framework, we will use the same sigma values for both filters. For $\sigma_s=5.0$, $\sigma_c=0.1$, adding Gaussian noise $N(0,0.05)$ and Poisson noise to the original image, these are the results for PSNR and execution time:
110
112
111
113

112
114
@@ -116,25 +118,39 @@ Para sigma_s=5.0, sigma_c=0.1, añadiendo ruido Gaussiano N(0,0.05) Y Poisson A
116
118
117
119

118
120
119
-
Para sigma_s=7.0, sigma_c=0.25, añadiendo ruido Gaussiano N(0,0.25) Y Poisson:
121
+
For $\sigma_s=7.0$, $\sigma_c=0.25$, adding Gaussian noise $N(0,0.25)$ and Poisson noise:
120
122
121
123

122
124
123
125

124
126
125
127

126
128
127
-
Para sigma_s=5.0, sigma_c=0.5, añadiendo ruido Gaussiano N(0,0.25), Impulsional (p=0.02) Y Poisson:
129
+
For $\sigma_s=5.0$, $\sigma_c=0.5$, adding Gaussian noise $N(0,0.25)$, Impulsive noise ($p=0.02$), and Poisson noise:
128
130
129
131

130
132
131
133

132
134
133
135

134
136
137
+
We are fortunate that this filter is available in OpenCV (tested in C++); let’s try it out:
138
+
139
+
For $\sigma_s=16.0$, $\sigma_c=0.2$, adding Gaussian noise $N(0,0.25)$:
135
140
136
-
# Conclusión
141
+

137
142
138
-
Ante niveles altos de ruido, se nota una dominancia del método adaptive manifold sobre el bilateral, algo muy interesante. Ante niveles bajos, el biltro filateral puede filtrar mejor con kernels pequeños, pero si lo que se desea es eficiencia computacional, adaptive manifold es la opción a elegir.
143
+

144
+
145
+

146
+
147
+
# Conclusion
148
+
149
+
At high noise levels, the adaptive manifold method shows superiority over the bilateral filter, which is quite interesting. At low levels, the bilateral filter may perform better with small kernels, but if computational efficiency is the goal, the adaptive manifold is the better choice.
139
150
140
151
[1] Keenan Crane, DISCRETE DIFFERENTIAL GEOMETRY: AN APPLIED INTRODUCTION, 2023 p. 9
152
+
[2] Geometric Deep Learning Grids, Groups, Graphs, Geodesics, and Gauges Michael M. Bronstein1, Joan Bruna2, Taco Cohen3, Petar Veličković4 May 4, 2021
153
+
[3] Peleg, S., Rousso, B., Rav-Acha, A., & Zomet, A. (2000). Mosaicing on adaptive manifolds.
154
+
[4] Gastal, E. S. L., & Oliveira, M. M. (2012). Adaptive Manifolds for Real-Time High-Dimensional Filtering. ACM Transactions on Graphics (TOG), 31(4), 1–13.
155
+
[5] OpenCV. Adaptive Manifold Filter Documentation. Retrieved from https://docs.opencv.org/3.4/de/db7/classcv_1_1ximgproc_1_1AdaptiveManifoldFilter.html
0 commit comments