The resampling of an n-dimensional image can be carried out by n subsequent sets of 1-dimensional resamplings. What is the optimal order to carry out these 1-d resamplings to maximize efficiency?
Consider you have an n-dimensional image with extents . You want to resample this image to new extents and do this by resampling each dimension at a time. Let , and . A cost function for each of these resamplings can be given recursively as follows:
The total cost of the process is then given by
The problem is to construct an algorithm to find a with minimal total cost.
If one exchanges the values of and , then the costs are not influenced. Thus in this case:
To minimize the total cost one must choose such that is an ascending sequence.
One may want to expand the resampling filter support in some dimension for deliberate blurring. The expansion constants are called blurring factors. Using the same argument as before, one can prove that in many cases must be chosen such that is an ascending sequence, where contains the blurring factors. I have proved this for the cases where
There is only upsampling.
There is only downsampling.
There is both upsampling and downsampling, but the blurring factors are such that .
The remaining cases I have not been able to prove. I have a minor suspect they would be NP-hard. If someone can show otherwise, I’d be interested to hear it.
The solution to this problem was given by James Waldby as a result of a newsgroup discussion in sci.math.