Wavelet API
-
class Wavelet
A Wavelet.
When the orthogonality property is not explicitly provided it is inferred using FilterBank::is_orthogonal() and FilterBank::is_biorthogonal(). Only Orthogonality::ORTHOGONAL and Orthogonality::BIORTHOGONAL can be inferred. Orthogonality::NEARLY_ORTHOGONAL and Orthogonality::SEMIORTHOGONAL cannot be inferred and must be set explicitly.
Likewise, when the symmetry property is not explicity provided it is inferred using FilterBank::is_symmetric(). Only Symmetry::SYMMETRIC can be inferred. Symmetry::NEARLY_SYMMETRIC cannot be inferred and must be set explicity.
Note
Wavelet objects are designed to be allocated on the stack and passed by reference. They manage their memory internally using a single std::shared_ptr. Allocation using new incurs an two heap allocations. Passing by value incurs the cost of copying the shared pointer.
Public Functions
- Wavelet(
- const FilterBank &filter_bank,
- Orthogonality orthogonality,
- Symmetry symmetry,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet.
- Parameters:
filter_bank – [in]
orthogonality – [in]
symmetry – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- inline Wavelet(
- cv::InputArray decompose_lowpass,
- cv::InputArray decompose_highpass,
- cv::InputArray reconstruct_lowpass,
- cv::InputArray reconstruct_highpass,
- Orthogonality orthogonality,
- Symmetry symmetry,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet.
- Parameters:
decompose_lowpass – [in]
decompose_highpass – [in]
reconstruct_lowpass – [in]
reconstruct_highpass – [in]
orthogonality – [in]
symmetry – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- Wavelet(
- const FilterBank &filter_bank,
- Orthogonality orthogonality,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet object.
- Parameters:
filter_bank – [in]
orthogonality – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- inline Wavelet(
- cv::InputArray decompose_lowpass,
- cv::InputArray decompose_highpass,
- cv::InputArray reconstruct_lowpass,
- cv::InputArray reconstruct_highpass,
- Orthogonality orthogonality,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet object.
- Parameters:
decompose_lowpass – [in]
decompose_highpass – [in]
reconstruct_lowpass – [in]
reconstruct_highpass – [in]
orthogonality – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- Wavelet(
- const FilterBank &filter_bank,
- Symmetry symmetry,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet object.
- Parameters:
filter_bank –
symmetry –
name –
family –
wavelet_vanishing_moments –
scaling_vanishing_moments –
- inline Wavelet(
- cv::InputArray decompose_lowpass,
- cv::InputArray decompose_highpass,
- cv::InputArray reconstruct_lowpass,
- cv::InputArray reconstruct_highpass,
- Symmetry symmetry,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet object.
- Parameters:
decompose_lowpass – [in]
decompose_highpass – [in]
reconstruct_lowpass – [in]
reconstruct_highpass – [in]
symmetry – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- Wavelet(
- const FilterBank &filter_bank,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet object.
- Parameters:
filter_bank – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- inline Wavelet(
- cv::InputArray decompose_lowpass,
- cv::InputArray decompose_highpass,
- cv::InputArray reconstruct_lowpass,
- cv::InputArray reconstruct_highpass,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new Wavelet object.
- Parameters:
decompose_lowpass – [in]
decompose_highpass – [in]
reconstruct_lowpass – [in]
reconstruct_highpass – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- inline Wavelet(
- cv::InputArray reconstruct_lowpass,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new orthogonal Wavelet object.
- Parameters:
reconstruct_lowpass – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- inline Wavelet(
- cv::InputArray decompose_lowpass,
- cv::InputArray reconstruct_lowpass,
- const std::string &name = "",
- const std::string &family = "",
- int wavelet_vanishing_moments = -1,
- int scaling_vanishing_moments = -1,
Construct a new biorthogonal Wavelet object.
- Parameters:
decompose_lowpass – [in]
reconstruct_lowpass – [in]
name – [in]
family – [in]
wavelet_vanishing_moments – [in]
scaling_vanishing_moments – [in]
- Wavelet as_type(
- int type,
Copies the wavelet and converts the filter bank data type.
- Parameters:
type – [in] The filter bank data type.
- inline int type(
The filter bank data type.
- Parameters:
type – [in] The filter bank data type.
- inline int wavelet_vanishing_moments(
The number of vanishing moments of the wavelet function.
- inline int scaling_vanishing_moments(
The number of vanishing moments of the scaling function.
- inline Orthogonality orthogonality(
Returns true if the wavelet is orthogonal.
- inline bool is_orthogonal(
Returns true if the wavelet is orthogonal.
- inline bool is_biorthogonal(
Returns true if the wavelet is biorthogonal.
- inline bool is_symmetric(
Returns true if wavelet is symmetric.
- inline std::string family(
The name of the wavelet family.
- inline std::string name(
The name of the wavelet.
- inline FilterBank filter_bank(
The filter bank that defines the wavelet.
- inline int filter_length(
The length of the filter bank kernels.
- inline bool is_valid(
Returns true if the wavelet is valid.
A valid wavelet has a nonempty filter_bank(). A default constructed wavelet is always invalid.
Public Static Functions
- static inline Wavelet create(
- const std::string &name,
- auto&&... args,
Creates a Wavelet by name.
Wavelet wavelet = Wavelet::create("db2");
Use available_wavelets() to get available wavelet names. Use register_factory() to register a factory for custom wavelets.
- Parameters:
name – [in] The name of the wavelet factory.
args – [in] The unbound arguments of the wavelet factory registered with register_factory().
-
template<typename ...BoundArgs>
static inline void register_factory(
) Register a Wavelet factory for use by create().
The registered factory function is
std::bind(factory, args...))and the registered factory name is the name() of the wavelet created by the bound factory.Consider an example where the filter bank is determined by an
orderthat can be 2, 3, or 4.// Define a factory function that returns a Wavelet whose name depends on order. Wavelet create_my_custom_wavelet(int order) { // Compute or lookup filter bank based on order. FilterBank filter_bank = ...; std::string name = "my" + std::to_string(order); std::string family = "My Wavelet"; return Wavelet(filter_bank, name, family); } // Register a factory for each possible set of factory arguments. Wavelet::register_factory(create_my_custom_wavelet, 2); Wavelet::register_factory(create_my_custom_wavelet, 3); Wavelet::register_factory(create_my_custom_wavelet, 4); // Create a 4th order wavelet. Wavelet my4_wavelet = Wavelet::create("my4");
Note
Use this overload when all sets of factory parameters can be enumerated and the wavelet name() uniquely determines the filter_bank(). Otherwise, use this register_factory() instead.
- Parameters:
factory – [in] A callable that creates a Wavelet object.
args – [in] All of the arguments passed to factory.
- Throws:
cv::Exception – If a factory with the same name is already registered.
-
template<typename ...BoundArgs, typename ...CallArgs>
static inline void register_factory(
) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The registered factory function is
std::bind_front(factory, args...)).Consider an example where the filter bank is determined by an
orderthat can be 2, 3, or 4 and a floating pointextra_param. Sinceextra_paramcannot be enumerated, the the factory name only depends on theorder.Note that in this case the wavelet name() and the factory name are different.// Define a wavelet factory. Wavelet create_my_wavelet(int order, float extra_param) { // Compute or lookup filter bank based on order and extra_param. FilterBank filter_bank = ...; std::string name = "my" + std::to_string(order) + "_" + std::to_string(extra_param); std::string family = "MyFamily" return Wavelet(filter_bank, name, family); } // Register factories for orders 2, 3, and 4. Wavelet::register_factory("my2", create_my_wavelet, 2); Wavelet::register_factory("my3", create_my_wavelet, 3); Wavelet::register_factory("my4", create_my_wavelet, 4); // Create two 4th order wavelets. // The first uses extra_param = 6.0 and the second uses extra_param = 4.0. Wavelet my4_wavelet1 = Wavelet::create("my4", 6.0); Wavelet my4_wavelet2 = Wavelet::create("my4", 4.0);
Note
Use this overload when it is impossible or inpractical to enumerate all sets of factory parameters, or when the wavelet name() does not uniquely determine the filter_bank(). Otherwise, use this register_factory() instead.
- Parameters:
name – [in] The name of the wavelet factory.
factory – [in] A callable that creates a Wavelet object.
args – [in] The front arguments passed to factory.
- Throws:
cv::Exception – If a factory with the same name is already registered.
-
class FilterBank
Two dimensional discrete wavelet transform filter bank.
This class is used as a building block to implement two dimensional multiscale discrete wavelet transforms. It provides both the decomposition (i.e. analysis) and reconstruction (i.e. synthesis) transformations at a single spatial scale.
Decomposition is a two stage cascade where each stage is a two channel filter bank consisting of a lowpass filter \(g_d[n]\) and a highpass filter \(h_d[n]\). At each stage, both channels are downsampled by a factor of two. The first stage convolves along rows and downsamples columns. The second stage convolves along columns and downsamples rows. This results in four outputs:
Approximation Subband Coefficients (Lowpass-Lowpass)
Horizontal Detail Subband Coefficients (Lowpass-Highpass)
Vertical Detail Subband Coefficients (Highpass-Lowpass)
Diagonal Detail Subband Coefficients (Highpass-Highpass)

Reconstruction revserses the signal flow, uses the reconstruction kernels \(g_r[n]\) and \(h_r[n]\), and upsamples instead of downsampling.

Note
FilterBank objects are designed to be allocated on the stack and passed by reference. They manage their memory internally using a single std::shared_ptr. Allocation using new incurs two heap allocations. Passing by value incurs the cost of copying the shared pointer.
Factories
- static FilterBank create_orthogonal(
- cv::InputArray reconstruct_lowpass_kernel,
Creates an orthogonal wavelet filter bank.
This function is equivalent to:
cv::normalize(reconstruct_lowpass_kernel, reconstruct_lowpass_kernel); create_conjugate_mirror(reconstruct_lowpass_kernel);
- Parameters:
reconstruct_lowpass_kernel – [in] The reconstruction lowpass kernel \(g_r[n]\).
- Throws:
cv::Exception – If the filter bank is not orthogonal.
- static FilterBank create_conjugate_mirror(
- cv::InputArray reconstruct_lowpass_kernel,
Creates conjugate mirror filter bank.
This factory creates a conjugate mirror filter bank from \(g_r[n]\) whose remaining kernels are defined to be
\[\begin{split}\begin{align} g_d[n] &= g_r[-n] \\\\ h_d[n] &= (-1^n) \, g_r[n] \\\\ h_r[n] &= (-1^{n + 1}) \, g_r[-n] \end{align}\end{split}\]Note
This function clones reconstruct_lowpass_kernel.
- Parameters:
reconstruct_lowpass_kernel – [in] The reconstruction lowpass kernel \(g_r[n]\).
- static FilterBank create_biorthogonal(
- cv::InputArray reconstruct_lowpass_kernel,
- cv::InputArray decompose_lowpass_kernel,
Creates a biorthogonal wavelet filter bank.
This function is equivalent to:
cv::normalize(reconstruct_lowpass_kernel, reconstruct_lowpass_kernel); cv::normalize(decompose_lowpass_kernel, decompose_lowpass_kernel); create_quadrature_mirror(reconstruct_lowpass_kernel, decompose_lowpass_kernel);
- Parameters:
reconstruct_lowpass_kernel – [in] The reconstruction lowpass kernel \(g_r[n]\).
decompose_lowpass_kernel – [in] The decomposition lowpass kernel \(g_d[n]\).
- Throws:
cv::Exception – If the filter bank is not biorthogonal.
- static FilterBank create_quadrature_mirror(
- cv::InputArray reconstruct_lowpass_kernel,
- cv::InputArray decompose_lowpass_kernel,
Creates a quadrature mirror filter bank.
This factory creates a quadrature mirror filter bank from \(g_d[n]\) and \(g_r[n]\) whose remaining kernels are defined to be
\[\begin{split}\begin{align} h_d[n] &= (-1^n) \, g_r[n] \\\\ h_r[n] &= (-1^{n + 1}) \, g_d[n] \end{align}\end{split}\]Note
This function clones decompose_lowpass_kernel and reconstruct_lowpass_kernel.
- Parameters:
reconstruct_lowpass_kernel – [in] The reconstruction lowpass kernel \(g_r[n]\).
decompose_lowpass_kernel – [in] The decomposition lowpass kernel \(g_d[n]\).
Public Functions
-
FilterBank()
Construct an empty filter bank.
- FilterBank(
- cv::InputArray decompose_lowpass,
- cv::InputArray decompose_highpass,
- cv::InputArray reconstruct_lowpass,
- cv::InputArray reconstruct_highpass,
Construct a new filter bank.
- Parameters:
decompose_lowpass – [in] The decomposition lowpass filter kernel \(g_d[n]\).
decompose_highpass – [in] The decomposition highpass filter kernel \(h_d[n]\).
reconstruct_lowpass – [in] The reconstruction lowpass filter kernel \(g_r[n]\).
reconstruct_highpass – [in] The reconstruction highpass filter kernel \(h_r[n]\).
- Throws:
cv::Exception – If
The decomposition kernels are not vectors of the same size
The reconstruction kernels are not vectors of the same size
All of the kernels are not the same type
- FilterBank(
- const FilterBank &other,
Copy Constructor.
- FilterBank(
- FilterBank &&other,
Move Constructor.
- inline KernelPair decompose_kernels(
The decomposition kernels.
- inline KernelPair reconstruct_kernels(
The reconstruction kernels.
- FilterBank as_type(
- int type,
Converts the filter kernels to a different type.
- Parameters:
type – Must be CV_64F or CV_32F.
- inline bool empty(
Returns true if the filter kernels are empty.
See also
cv::Mat::empty
- inline int depth(
The depth of the filter kernels data type.
See also
cv::Mat::depth
- inline int type(
The filter kernels data type.
See also
cv::Mat::type
- inline int filter_length(
The length of the filter kernels.
- cv::Size subband_size(
- const cv::Size &image_size,
Returns the size of each subband for the given image size.
- Parameters:
image_size – [in] The size of the decomposed/reconstructed image.
- bool is_orthogonal(
Returns true if this filter bank defines an orthogonal wavelet.
An orthogonal filter bank statisfies the perfect reconstruction constraints (i.e. is_biorthogonal())
\[\begin{split}\begin{align} g_r[n] * g_d[n] &+ h_r[n] * h_d[n] = 2 \delta[n] \tag{No Distortion} \\\\ g_r[n] * (-1)^n g_d[n] &+ h_r[n] * (-1)^n h_d[n] = 0 \tag{Alias Cancellation} \end{align}\end{split}\]and the double-shift orthogonality contstraints [1]\[\begin{split}\begin{align} \sum g_d[n] g_d[n - 2k] &= \delta[k] \\\\ \sum g_d[n] h_d[n - 2k] &= 0 \\\\ \sum h_d[n] h_d[n - 2k] &= \delta[k] \end{align}\end{split}\]
- bool is_biorthogonal(
Returns true if this filter bank defines a biorthogonal wavelet.
A biorthogonal filter bank statisfies the perfect reconstruction constraints [1] :
\[\begin{split}\begin{align} g_r[n] * g_d[n] &+ h_r[n] * h_d[n] = 2 \delta[n] \tag{No Distortion} \\\\ g_r[n] * (-1)^n g_d[n] &+ h_r[n] * (-1)^n h_d[n] = 0 \tag{Alias Cancellation} \end{align}\end{split}\]In the z-domain these are
\[\begin{split}\begin{align} G_r(z) G_d(z) &+ H_r(z) H_r(z) = 2 z^{-1} \tag{No Distortion} \\\\ G_r(z) G_d(-z) &+ H_r(z) H_d(z) = 0 \tag{Alias Cancellation} \end{align}\end{split}\]This function is equivalent to:
satisfies_alias_cancellation() && satisfies_no_distortion().
- bool satisfies_alias_cancellation(
Returns true if this filter bank satisifies the alias cancellation constraint.
The alias cancellation constraint [1] is
\[\begin{equation} g_r[n] * (-1)^n g_d[n] + h_r[n] * (-1)^n h_d[n] = 0 \end{equation}\]In the z-domain this is\[\begin{equation} G_r(z) G_d(-z) + H_r(z) H_d(z) = 0 \end{equation}\]
- bool satisfies_no_distortion(
Returns true if this filter bank satisifies the no distortion constraint.
The no distortion constraint [1] is
\[\begin{equation} g_r[n] * g_d[n] + h_r[n] * h_d[n] = 2 \delta[n] \end{equation}\]In the z-domain this is\[\begin{equation} G_r(z) G_d(z) + H_r(z) H_r(z) = 2 z^{-1} \end{equation}\]
- bool is_symmetric(
Returns true if all the kernels are symmetric.
- bool is_antisymmetric(
Returns true if all the kernels are symmetric.
- bool is_linear_phase(
Returns true if all the kernels are symmetric or antisymmetric.
- void decompose(
- cv::InputArray image,
- cv::OutputArray approx,
- cv::OutputArray horizontal_detail,
- cv::OutputArray vertical_detail,
- cv::OutputArray diagonal_detail,
- int border_type = cv::BORDER_DEFAULT,
- const cv::Scalar &border_value = cv::Scalar(),
Decompose an image.
The outputs will all have the same number of channels as the input image and depth equal to
std::max(image.depth(), depth()).The size of each output will be equal to subband_size(). Because full convolution requires extrapolating the image by the filter_length() - 1 on all sides, the size of the outputs will generally be larger than half the image.size().
- Parameters:
image – [in] The image to decompose. This can be any type, single channel or multichannel.
approx – [out] The approximation subband coefficients.
horizontal_detail – [out] The horizontal detail subband coefficients.
vertical_detail – [out] The vertical detail subband coefficients.
diagonal_detail – [out] The diagonal detail subband coefficients.
border_type – [in] The border extrapolation method.
border_value – [in] The border extrapolation value if border_type is cv::BORDER_CONSTANT.
- Throws:
cv::Exception – If the width or height of the image is less than or equal to one.
- void reconstruct(
- cv::InputArray approx,
- cv::InputArray horizontal_detail,
- cv::InputArray vertical_detail,
- cv::InputArray diagonal_detail,
- cv::OutputArray image,
- const cv::Size &image_size,
Reconstruct an image.
The coefficients approx, horizontal_detail, vertical_detail, and diagonal_detail must all be the same size, same depth, and have the same number of channels. If not, an execption is thrown.
The output image will have the same number of channels as the coefficients and depth equal to
std::max(approx.depth(), depth()).The image_size of the reconstructed image is used to discard the exptrapolated border added by decompose(). It must be explicitly provided because it cannot be inferred from the size of the coefficient subbands due to potential integer truncation incurred by the downsampling operation in decompose().
- Parameters:
approx – [in] The approximation subband coefficients.
horizontal_detail – [in] The horizontal detail subband coefficients.
vertical_detail – [in] The vertical detail subband coefficients.
diagonal_detail – [in] The diagonal detail subband coefficients.
image – [out] The reconstructed image.
image_size – [in] The size of the reconstructed image. This must be the size of the image passed to decompose().
- Throws:
cv::Exception – If approx, horizontal_detail, vertical_detail, and diagonal_detail are not the same size or do not have the same number of channels.
- FilterBank reverse(
Swaps and flips the decomposition and reconstruction kernels.
- bool operator==(
- const FilterBank &other,
Two filter banks are equal if their decompose_kernels() are equal and their reconstruct_kernels() are equal.
Friends
- friend std::ostream &operator<<(
- std::ostream &stream,
- const FilterBank &filter_bank,
Writes a string representation of a FilterBank to an output stream.
-
class KernelPair
A pair of lowpass and highpass filter kernels.
Public Functions
- inline KernelPair(
Construct a pair of empty kernels.
- inline KernelPair(
- const cv::Mat &lowpass,
- const cv::Mat &highpass,
Construct a pair of kernels.
The two kernels are assumed to be the same size and type.
See also
make_kernel_pair
- Parameters:
lowpass – [in] The lowpass kernel coefficients.
highpass – [in] The highpass kernel coefficients.
- inline cv::Mat lowpass(
The lowpass kernel coefficients.
- inline cv::Mat highpass(
The highpass kernel coefficients.
- KernelPair as_type(
- int type,
Converts kernel coefficients to a different data type.
- Parameters:
type –
- inline bool empty(
Returns true if both kernels are empty.
- inline int type(
The coefficient data type.
- inline int depth(
The depth of the coefficient data type.
- bool operator==(
- const KernelPair &other,
Returns true if the lowpass kernels are equal and the highpass kernels are equal.
-
enum wtcv::DetailSubband
FilterBank detail subband identifiers.
Values:
-
enumerator HORIZONTAL
Lowpass - Highpass Subband
-
enumerator VERTICAL
Highpass - Lowpass Subband
-
enumerator DIAGONAL
Highpass - Highpass Subband
-
enumerator HORIZONTAL
- string std::to_string(
- wtcv::DetailSubband subband,
-
enum class wtcv::Symmetry
The degree of Wavelet symmetry.
Values:
-
enumerator SYMMETRIC
-
enumerator NEARLY_SYMMETRIC
-
enumerator ASYMMETRIC
-
enumerator SYMMETRIC
-
enum class wtcv::Orthogonality
The degree of Wavelet orthogonality.
Values:
-
enumerator ORTHOGONAL
-
enumerator BIORTHOGONAL
-
enumerator NEARLY_ORTHOGONAL
-
enumerator SEMIORTHOGONAL
-
enumerator NONE
-
enumerator ORTHOGONAL
Wavelet Factories
- Wavelet wtcv::create_haar(
- int type = CV_64FC1,
Creates a Haar Wavelet.
- Parameters:
type – [in] The wavelet data type.
- Wavelet wtcv::create_daubechies(
- int order,
- int type = CV_64FC1,
Creates a Daubechies Wavelet.
- Parameters:
order – [in] The order of the wavelet. Must be 2 \(\le\) order \(\le\) 38.
type – [in] The wavelet data type.
- Throws:
cv::Exception – If order is invalid.
- Wavelet wtcv::create_symlets(
- int order,
- int type = CV_64FC1,
Creates a Symlets Wavelet.
- Parameters:
order – [in] The order of the wavelet. Must be 2 \(\le\) order \(\le\) 20.
type – [in] The wavelet data type.
- Throws:
cv::Exception – If order is invalid.
- Wavelet wtcv::create_coiflets(
- int order,
- int type = CV_64FC1,
Creates a Coiflets Wavelet.
- Parameters:
order – [in] The order of the wavelet. Must be 1 \(\le\) order \(\le\) 17.
type – [in] The wavelet data type.
- Throws:
cv::Exception – If order is invalid.
- Wavelet wtcv::create_biorthogonal(
- int wavelet_vanishing_moments,
- int scaling_vanishing_moments,
- int type = CV_64FC1,
Creates a Biorthogonal Wavelet.
- Parameters:
wavelet_vanishing_moments – [in] The number of vanishing moments of the wavelet function.
scaling_vanishing_moments – [in] The number of vanishing moments of the scaling function.
type – [in] The wavelet data type.
- Throws:
cv::Exception – If wavelet_vanishing_moments and scaling_vanishing_moments are an invalid pair.
- Wavelet wtcv::create_reverse_biorthogonal(
- int wavelet_vanishing_moments,
- int scaling_vanishing_moments,
- int type = CV_64FC1,
Creates a Reverse Biorthogonal Wavelet.
- Parameters:
wavelet_vanishing_moments – [in] The number of vanishing moments of the wavelet function.
scaling_vanishing_moments – [in] The number of vanishing moments of the scaling function.
type – [in] The wavelet data type.
- Throws:
cv::Exception – If wavelet_vanishing_moments and scaling_vanishing_moments are an invalid pair.