Math with F0-transform support#
Detailed Description#
Fuzzy transform ( \(F^0\)-transform) of the 0th degree transforms whole image to a matrix of its components. These components are used in latter computation where each of them represents average color of certain subarea.
Function Documentation#
FT02D_components()#
void cv::ft::FT02D_components(
InputArray matrix,
InputArray kernel,
OutputArray components,
InputArray mask = noArray() )
#include <opencv2/fuzzy/fuzzy_F0_math.hpp>
Python:
cv.ft.FT02D_components(matrix, kernel[, components[, mask]]) -> components
Computes components of the array using direct \(F^0\)-transform.
The function computes components using predefined kernel and mask.
Parameters
matrix— Input array.kernel— Kernel used for processing. Functionft::createKernelcan be used.components— Output 32-bit float array for the components.mask— Mask can be used for unwanted area marking.
FT02D_FL_process()#
void cv::ft::FT02D_FL_process(
InputArray matrix,
const int radius,
OutputArray output )
#include <opencv2/fuzzy/fuzzy_F0_math.hpp>
Python:
cv.ft.FT02D_FL_process(matrix, radius[, output]) -> output
Sligtly less accurate version of \(F^0\)-transfrom computation optimized for higher speed. The methods counts with linear basic function.
This function computes F-transfrom and inverse F-transfotm using linear basic function in one step. It is ~10 times faster than ft::FT02D_process method.
Parameters
matrix— Input 3 channels matrix.radius— Radius of theft::LINEARbasic function.output— Output array.
FT02D_FL_process_float()#
void cv::ft::FT02D_FL_process_float(
InputArray matrix,
const int radius,
OutputArray output )
#include <opencv2/fuzzy/fuzzy_F0_math.hpp>
Python:
cv.ft.FT02D_FL_process_float(matrix, radius[, output]) -> output
Sligtly less accurate version of \(F^0\)-transfrom computation optimized for higher speed. The methods counts with linear basic function.
This function computes F-transfrom and inverse F-transfotm using linear basic function in one step. It is ~9 times faster then ft::FT02D_process method and more accurate than ft::FT02D_FL_process method.
Parameters
matrix— Input 3 channels matrix.radius— Radius of theft::LINEARbasic function.output— Output array.
FT02D_inverseFT()#
void cv::ft::FT02D_inverseFT(
InputArray components,
InputArray kernel,
OutputArray output,
int width,
int height )
#include <opencv2/fuzzy/fuzzy_F0_math.hpp>
Python:
cv.ft.FT02D_inverseFT(components, kernel, width, height[, output]) -> output
Computes inverse \(F^0\)-transfrom.
Computation of inverse F-transform.
Parameters
components— Input 32-bit float single channel array for the components.kernel— Kernel used for processing. Functionft::createKernelcan be used.output— Output 32-bit float array.width— Width of the output array.height— Height of the output array.
FT02D_iteration()#
int cv::ft::FT02D_iteration(
InputArray matrix,
InputArray kernel,
OutputArray output,
InputArray mask,
OutputArray maskOutput,
bool firstStop )
#include <opencv2/fuzzy/fuzzy_F0_math.hpp>
Python:
cv.ft.FT02D_iteration(matrix, kernel, mask, firstStop[, output[, maskOutput]]) -> retval, output, maskOutput
Computes \(F^0\)-transfrom and inverse \(F^0\)-transfrom at once and return state.
This function computes iteration of F-transfrom and inverse F-transfotm and handle image and mask change. The function is used in ft::inpaint function.
Parameters
matrix— Input matrix.kernel— Kernel used for processing. Functionft::createKernelcan be used.output— Output 32-bit float array.mask— Mask used for unwanted area marking.maskOutput— Mask after one iteration.firstStop— If true function returns -1 when first problem appears. In case offalsethe process is completed and summation of all problems returned.
FT02D_process()#
void cv::ft::FT02D_process(
InputArray matrix,
InputArray kernel,
OutputArray output,
InputArray mask = noArray() )
#include <opencv2/fuzzy/fuzzy_F0_math.hpp>
Python:
cv.ft.FT02D_process(matrix, kernel[, output[, mask]]) -> output
Computes \(F^0\)-transfrom and inverse \(F^0\)-transfrom at once.
This function computes F-transfrom and inverse F-transfotm in one step. It is fully sufficient and optimized for cv::Mat.
Parameters
matrix— Input matrix.kernel— Kernel used for processing. Functionft::createKernelcan be used.output— Output 32-bit float array.mask— Mask used for unwanted area marking.