I checked with dct
function in Matlab but it only implemented DCT along the columns for a matrix input:
>> help dct
If X is a matrix, the DCT operation is applied to each
column.
Is there a function that can perform 2D DCT in Matlab, or are there some algorithms that can apply dct
, make some transform, then obtain the 2D DCT?
According to Wikipedia, "Multidimensional variants of the various DCT types follow straightforwardly from the one-dimensional definitions: they are simply a separable product (equivalently, a composition) of DCTs along each dimension."
Following this, you should be able to get the 2d-DCT by computing
There's also
dct2
in the Image Processing Toolbox, and the core of the implementation is