Resampling n-dimensional images in an optimal order

Back to Resampling

Problem

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?

Formal problem statement

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.

Solution

If one exchanges the values of and , then the costs are not influenced. Thus in this case:

Case ,

Case ,

Case ,

Result

To minimize the total cost one must choose such that is an ascending sequence.

Generalization

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

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.

Acknowledgements

The solution to this problem was given by James Waldby as a result of a newsgroup discussion in sci.math.