pub fn dct(src: &dyn core::ToInputArray, dst: &mut dyn core::ToOutputArray, flags: i32) -> Result<()> {
	input_array_arg!(src);
	output_array_arg!(dst);
	unsafe { sys::cv_dct_const__InputArrayX_const__OutputArrayX_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), flags) }.into_result()
}
/// Performs a forward or inverse discrete Cosine transform of 1D or 2D array.
/// 
/// The function cv::dct performs a forward or inverse discrete Cosine transform (DCT) of a 1D or 2D
/// floating-point array:
/// *   Forward Cosine transform of a 1D vector of N elements:
///    ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20C%5E%7B%28N%29%7D%20%20%5Ccdot%20X)
///    where
///    ![block formula](https://latex.codecogs.com/png.latex?C%5E%7B%28N%29%7D%5F%7Bjk%7D%3D%20%5Csqrt%7B%5Calpha%5Fj%2FN%7D%20%5Ccos%20%5Cleft%20%28%20%5Cfrac%7B%5Cpi%282k%2B1%29j%7D%7B2N%7D%20%5Cright%20%29)
///    and
///    ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha%5F0%3D1), ![inline formula](https://latex.codecogs.com/png.latex?%5Calpha%5Fj%3D2) for *j \> 0*.
/// *   Inverse Cosine transform of a 1D vector of N elements:
///    ![block formula](https://latex.codecogs.com/png.latex?X%20%3D%20%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5E%7B%2D1%7D%20%20%5Ccdot%20Y%20%3D%20%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5ET%20%20%5Ccdot%20Y)
///    (since ![inline formula](https://latex.codecogs.com/png.latex?C%5E%7B%28N%29%7D) is an orthogonal matrix, ![inline formula](https://latex.codecogs.com/png.latex?C%5E%7B%28N%29%7D%20%5Ccdot%20%5Cleft%28C%5E%7B%28N%29%7D%5Cright%29%5ET%20%3D%20I) )
/// *   Forward 2D Cosine transform of M x N matrix:
///    ![block formula](https://latex.codecogs.com/png.latex?Y%20%3D%20C%5E%7B%28N%29%7D%20%20%5Ccdot%20X%20%20%5Ccdot%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5ET)
/// *   Inverse 2D Cosine transform of M x N matrix:
///    ![block formula](https://latex.codecogs.com/png.latex?X%20%3D%20%20%5Cleft%20%28C%5E%7B%28N%29%7D%20%5Cright%20%29%5ET%20%20%5Ccdot%20X%20%20%5Ccdot%20C%5E%7B%28N%29%7D)
/// 
/// The function chooses the mode of operation by looking at the flags and size of the input array:
/// *   If (flags & #DCT_INVERSE) == 0 , the function does a forward 1D or 2D transform. Otherwise, it
///    is an inverse 1D or 2D transform.
/// *   If (flags & #DCT_ROWS) != 0 , the function performs a 1D transform of each row.
/// *   If the array is a single column or a single row, the function performs a 1D transform.
/// *   If none of the above is true, the function performs a 2D transform.
/// 
/// 
/// Note: Currently dct supports even-size arrays (2, 4, 6 ...). For data analysis and approximation, you
/// can pad the array when necessary.
/// Also, the function performance depends very much, and not monotonically, on the array size (see
/// getOptimalDFTSize ). In the current implementation DCT of a vector of size N is calculated via DFT
/// of a vector of size N/2 . Thus, the optimal DCT size N1 \>= N can be calculated as:
/// ```ignore
///    size_t getOptimalDCTSize(size_t N) { return 2*getOptimalDFTSize((N+1)/2); }
///    N1 = getOptimalDCTSize(N);
/// ```
/// 
/// ## Parameters
/// * src: input floating-point array.
/// * dst: output array of the same size and type as src .
/// * flags: transformation flags as a combination of cv::DftFlags (DCT_*)
/// ## See also
/// dft , getOptimalDFTSize , idct
/// 
/// ## C++ default parameters
/// * flags: 0
Performs a forward or inverse discrete Cosine transform of 1D or 2D array.
The function cv::dct performs a forward or inverse discrete Cosine transform (DCT) of a 1D or 2D
floating-point array:
Forward Cosine transform of a 1D vector of N elements:
[block formula]
where
[block formula]
and
[inline formula], ![inline formula] for *j \> 0*.
Inverse Cosine transform of a 1D vector of N elements:
[block formula]
(since ![inline formula] is an orthogonal matrix, ![inline formula] )
Forward 2D Cosine transform of M x N matrix:
[block formula]
Inverse 2D Cosine transform of M x N matrix:
[block formula]

The function chooses the mode of operation by looking at the flags and size of the input array:
If (flags & #DCT_INVERSE) == 0 , the function does a forward 1D or 2D transform. Otherwise, it
is an inverse 1D or 2D transform.
If (flags & #DCT_ROWS) != 0 , the function performs a 1D transform of each row.
If the array is a single column or a single row, the function performs a 1D transform.
If none of the above is true, the function performs a 2D transform.

Currently dct supports even-size arrays (2, 4, 6 ...). For data analysis and approximation, you
can pad the array when necessary.
Also, the function performance depends very much, and not monotonically, on the array size (see
getOptimalDFTSize ). In the current implementation DCT of a vector of size N is calculated via DFT
of a vector of size N/2 .
Performs a forward or inverse discrete Cosine transform of 1D or 2D array . The function cv :: dct performs a forward or inverse discrete Cosine transform ( DCT ) of a 1D or 2D floating - point array : Forward Cosine transform of a 1D vector of N elements : [ block formula ] where [ block formula ] and [ inline formula ] ! [ inline formula ] for * j \ > 0 * . Inverse Cosine transform of a 1D vector of N elements : [ block formula ] ( since ! [ inline formula ] is an orthogonal matrix ! [ inline formula ] ) Forward 2D Cosine transform of M x N matrix : [ block formula ] Inverse 2D Cosine transform of M x N matrix : [ block formula ] The function chooses the mode of operation by looking at the flags and size of the input array : If ( flags & #DCT_INVERSE ) == 0 the function does a forward 1D or 2D transform . Otherwise it is an inverse 1D or 2D transform . If ( flags & #DCT_ROWS ) ! = 0 the function performs a 1D transform of each row . If the array is a single column or a single row the function performs a 1D transform . If none of the above is true the function performs a 2D transform . Currently dct supports even - size arrays ( 2 4 6 ... ) . For data analysis and approximation you can pad the array when necessary . Also the function performance depends very much and not monotonically on the array size ( see getOptimalDFTSize ) . In the current implementation DCT of a vector of size N is calculated via DFT of a vector of size N / 2 .
pub fn dct(src: &dyn core::ToInputArray, dst: &mut dyn core::ToOutputArray, flags: i32) -> Result<()> {
	input_array_arg!(src);
	output_array_arg!(dst);
	unsafe { sys::cv_dct_const__InputArrayX_const__OutputArrayX_int(src.as_raw__InputArray(), dst.as_raw__OutputArray(), flags) }.into_result()
}
pub fn dct ( src : & dyn core :: ToInputArray , dst : & mut dyn core :: ToOutputArray , flags : i32 ) -> Result < ( ) > { input_array_arg ! ( src ) ; output_array_arg ! ( dst ) ; unsafe { sys :: cv_dct_const__InputArrayX_const__OutputArrayX_int ( src . as_raw__InputArray ( ) , dst . as_raw__OutputArray ( ) , flags ) } . into_result ( ) }
Performs a forward or inverse discrete Cosine transform of 1D or 2D array.
Performs a forward or inverse discrete Cosine transform of 1D or 2D array .
src
&dyn core::ToInputArray
dst
&mut dyn core::ToOutputArray
flags
i32
see also
dft , getOptimalDFTSize , idct
dft getOptimalDFTSize idct
c++ default parameters
None