Math with F1-transform support#

Detailed Description#

Fuzzy transform ( \(F^1\)-transform) of the 1th degree transforms whole image to a matrix of its components. Each component is polynomial of the 1th degree carrying information about average color and average gradient of certain subarea.

Function Documentation#

FT12D_components()#

void cv::ft::FT12D_components(
InputArray matrix,
InputArray kernel,
OutputArray components )

#include <opencv2/fuzzy/fuzzy_F1_math.hpp>

Python:

cv.ft.FT12D_components(matrix, kernel[, components]) -> components

Computes components of the array using direct \(F^1\)-transform.

The function computes linear components using predefined kernel.

Parameters

  • matrix — Input array.

  • kernel — Kernel used for processing. Function ft::createKernel can be used.

  • components — Output 32-bit float array for the components.

FT12D_createPolynomMatrixHorizontal()#

void cv::ft::FT12D_createPolynomMatrixHorizontal(
int radius,
OutputArray matrix,
const int chn )

#include <opencv2/fuzzy/fuzzy_F1_math.hpp>

Python:

cv.ft.FT12D_createPolynomMatrixHorizontal(radius, chn[, matrix]) -> matrix

Creates horizontal matrix for \(F^1\)-transform computation.

The function creates helper horizontal matrix for \(F^1\)-transfrom processing. It is used for gradient computation.

Parameters

  • radius — Radius of the basic function.

  • matrix — The horizontal matrix.

  • chn — Number of channels.

FT12D_createPolynomMatrixVertical()#

void cv::ft::FT12D_createPolynomMatrixVertical(
int radius,
OutputArray matrix,
const int chn )

#include <opencv2/fuzzy/fuzzy_F1_math.hpp>

Python:

cv.ft.FT12D_createPolynomMatrixVertical(radius, chn[, matrix]) -> matrix

Creates vertical matrix for \(F^1\)-transform computation.

The function creates helper vertical matrix for \(F^1\)-transfrom processing. It is used for gradient computation.

Parameters

  • radius — Radius of the basic function.

  • matrix — The vertical matrix.

  • chn — Number of channels.

FT12D_inverseFT()#

void cv::ft::FT12D_inverseFT(
InputArray components,
InputArray kernel,
OutputArray output,
int width,
int height )

#include <opencv2/fuzzy/fuzzy_F1_math.hpp>

Python:

cv.ft.FT12D_inverseFT(components, kernel, width, height[, output]) -> output

Computes inverse \(F^1\)-transfrom.

Computation of inverse \(F^1\)-transform.

Parameters

  • components — Input 32-bit float single channel array for the components.

  • kernel — Kernel used for processing. The same kernel as for components computation must be used.

  • output — Output 32-bit float array.

  • width — Width of the output array.

  • height — Height of the output array.

FT12D_polynomial()#

void cv::ft::FT12D_polynomial(
InputArray matrix,
InputArray kernel,
OutputArray c00,
OutputArray c10,
OutputArray c01,
OutputArray components,
InputArray mask = noArray() )

#include <opencv2/fuzzy/fuzzy_F1_math.hpp>

Python:

cv.ft.FT12D_polynomial(matrix, kernel[, c00[, c10[, c01[, components[, mask]]]]]) -> c00, c10, c01, components

Computes elements of \(F^1\)-transform components.

The function computes components and its elements using predefined kernel and mask.

Parameters

  • matrix — Input array.

  • kernel — Kernel used for processing. Function ft::createKernel can be used.

  • c00 — Elements represent average color.

  • c10 — Elements represent average vertical gradient.

  • c01 — Elements represent average horizontal gradient.

  • components — Output 32-bit float array for the components.

  • mask — Mask can be used for unwanted area marking.

FT12D_process()#

void cv::ft::FT12D_process(
InputArray matrix,
InputArray kernel,
OutputArray output,
InputArray mask = noArray() )

#include <opencv2/fuzzy/fuzzy_F1_math.hpp>

Python:

cv.ft.FT12D_process(matrix, kernel[, output[, mask]]) -> output

Computes \(F^1\)-transfrom and inverse \(F^1\)-transfrom at once.

This function computes \(F^1\)-transfrom and inverse \(F^1\)-transfotm in one step. It is fully sufficient and optimized for cv::Mat.

Note

F-transform technique of first degreee is described in paper [324].

Parameters

  • matrix — Input matrix.

  • kernel — Kernel used for processing. Function ft::createKernel can be used.

  • output — Output 32-bit float array.

  • mask — Mask used for unwanted area marking.