I have double
matrix of say 480x640x128
and I want to resample it to 480x640x3
. I.e. I want each 128-element "page" portion to be interpolated and then sampled at 3 points.
How to do that?
I have double
matrix of say 480x640x128
and I want to resample it to 480x640x3
. I.e. I want each 128-element "page" portion to be interpolated and then sampled at 3 points.
How to do that?
Interpolation can be done by inserting zeros and applying Low Pass Filter.
The filter can easily be applied using the function filter
using its dim
property.
Now, the zeros can be done using copying the matrix to another matrix with larger 3rd dimension according to the interpolation factor.