OpenCV 4.10.0-dev
Open Source Computer Vision
|
This tutorial demonstrates to you how to use F-transform for image filtering. You will see:
As I shown in previous tutorial, F-transform is a tool of fuzzy mathematics highly usable in image processing. Let me rewrite the formula using kernel \(g\) introduced before as well:
\[ F^0_{kl}=\frac{\sum_{x=0}^{2h+1}\sum_{y=0}^{2h+1} \iota_{kl}(x,y) g(x,y)}{\sum_{x=0}^{2h+1}\sum_{y=0}^{2h+1} g(x,y)}, \]
where \(\iota_{kl} \subset I\) centered to pixel \((k \cdot h,l \cdot h)\) and \(g\) is a kernel. More details can be found in related papers.
Image filtering changes input in a defined way to enhance or simply change some concrete feature. Let me demonstrate some simple blur.
As a first step, we load input image.
Following the F-transform formula, we must specify a kernel.
So now, we have two kernels that differ in
radius
. Bigger radius leads to bigger blur.
The filtering itself is applied as shown below.
Output images look as follows.