# Fuzzy Frankot-Chellappa Algorithm for Surface Normal Integration
## 2 Fuzzy Concepts
Similarly, the partial derivative with respect to \(v\) is defined as_  
\[\frac{\partial\tilde{f}}{\partial v}(u_{0},v_{0}):=\lim_{h\to 0}\frac{\tilde{f}(u_{0},v_{0}+h) \ominus_{gH}\tilde{f}(u_{0},v_{0})}{h}.\]  
_This definition generalizes the classical derivative to the fuzzy domain by replacing the usual difference with the gH difference. The result is a fuzzy number representing the derivative at a point._  
**Definition 6** (Defuzzification). : _In order to compare fuzzy-valued outputs with crisp ground-truth data or to visualize numerical results, it is necessary to convert fuzzy numbers into real numbers through defuzzification._  
_In this work, we use the midpoint method based on the support of the triangular fuzzy number (TFN). Given a fuzzy value \(\tilde{z}_{i,j}\) with lower bound \(z_{i,j}^{-}\) and upper bound \(z_{i,j}^{+}\) (at \(\alpha=0\)), the defuzzified (crisp) value is computed as_  
\[d(\tilde{z}_{i,j})=\frac{1}{2}(z_{i,j}^{-}+z_{i,j}^{+})\]  
_This corresponds to the centroid of the base of the TFN and coincides with the core value in the case of symmetric fuzzy numbers. This defuzzification strategy is consistently applied throughout our method to obtain final numerical surfaces from fuzzy results._  
_Additionally, an adaptive defuzzification strategy is proposed in Section 5.2 to improve performance under data-dependent uncertainty._  
**Definition 7** (Fuzzy partition). : _A fuzzy partition of an interval \([a,b]\) is a collection of fuzzy sets \(A_{1},\ldots,A_{n-1}\) with membership functions \(\mu_{k}(x)\) that satisfy the following conditions:_  
1. \(\mu_{k}:[a,b]\rightarrow[0,1]\)_, with_ \(\mu_{k}(x_{k})=1\) _for some_ \(x_{k}\in[a,b]\)_;_
2. \(\mu_{k}(x)=0\) _if_ \(\chi\
otin(x_{k-1},x_{k+1})\)_, where_ \(x_{k-1}<x_{k}<x_{k+1}\)_;_
3. \(\mu_{k}(x)\) _is continuous on_ \([a,b]\)_;_
4. \(\mu_{k}(x)\) _is strictly increasing on_ \([x_{k-1},x_{k}]\) _and strictly decreasing on_ \([x_{k},x_{k+1}]\)_;_
5. \(\sum_{k=1}^{n-1}\mu_{k}(x)=1\) _for all_ \(x\in[x_{1},x_{n-1}]\)_._ _In an h-uniform fuzzy partition, the centers_ \(x_{k}\) _are equally spaced with step size_ \(h=\frac{b-a}{n}\)_. The membership functions_ \(\mu_{k}(x)\) _are usually symmetric triangular functions and are often referred to as basic functions of the partition. These form the foundation for defining the fuzzy transform._  
F-transform:The fuzzy transform (\(F\)-transform) is a technique to approximate a real-valued function using a fuzzy partition. It consists of the following: (i) a direct transform that computes fuzzy coefficients from data, and (ii) an inverse transform that reconstructs a smooth approximation from those coefficients. Given a set of points \(P=\{p_{0},\ldots,p_{l-1}\}\subseteq[a,b]\) and fuzzy sets \(A_{1},\ldots,A_{n-1}\) forming a fuzzy partition, the discrete \(F\)-transform of \(f\) is the vector \(F_{n}[f]=(F_{1},\ldots,F_{n-1})\) defined as  
\[F_{k}=\frac{\sum_{j=0}^{l-1}\mu_{k}(p_{j})\,f(p_{j})}{\sum_{j=0}^{l-1}\mu_{k} (p_{j})},\qquad k=1,\ldots,n-1 \tag{1}\]  
Each \(F_{k}\) approximates the local average behavior of \(f\) around \(x_{k}\). The inverse transform reconstructs \(f\) as  
\[f_{F,n}(p_{j})=\sum_{k=1}^{n-1}F_{k}\mu_{k}(p_{j}),\qquad j=0,\ldots,l-1 \tag{2}\]This \(f_{F,n}\) smooths out high-frequency components of \(f\), effectively acting as a low-pass filter. In two dimensions, let \(f(u,v)\) be defined on a grid \((p_{i},q_{j})\in[a,b]\times[c,d]\), and let \(\{A_{k}\}\) and \(\{B_{l}\}\) be fuzzy partitions of \([a,b]\) and \([c,d]\), respectively. The 2D \(F\)-transform is defined as  
\[F_{kl}=\frac{\sum_{i=1}^{M}\sum_{j=1}^{N}\mu_{k}(p_{i})v_{l}(q_{j})f(p_{i},q_{ j})}{\sum_{i=1}^{M}\sum_{j=1}^{N}\mu_{k}(p_{i})v_{l}(q_{j})} \tag{3}\]  
where \(\mu_{k}(x)\) and \(v_{k}(x)\) are membership functions.