Perfect Window Memoization: A Theoretical Model of an Optimization Technique for Image Processing Algorithms Farzad Khalvati 1 and Hamid R. Tizhoosh 2 1,2 Department of Systems Design Engineering, University of Waterloo Waterloo, Ontario, Canada Email: 1 farzad.khalvati@uwaterloo.ca, 2 tizhoosh@uwaterloo.ca Abstract— This work presents Perfect Window Memoiza- tion; a high-level processing model that gives an estimation (upper-bound) of performance gain for an image processed in software or hardware, obtained by eliminating the compu- tational redundancy of the image. We show mathematically, supported by experimental data, that the computational redundancy of an image is, in fact, inherited from two basic data redundancies of the image; coding and interpixel redundancy. This is a simple, yet a revealing concept to use in practice by which images can be categorized based on their potential performance gain in software and hardware by only their fundamental redundancies, with no need to im- plement a mechanism to actually exploit the computational redundancy in software or hardware. The proposed model can be used as a useful tool in analyzing images from the performance perspective in the early stages of designing an optimization technique. Keywords: Coding redundancy, interpixel redundancy, window memoization, Performance optimization, Markov Model 1. Introduction High-performance implementations of image processing algorithms are an important issue in real-time applications. The high volume of image data combined with the require- ments of real-time systems makes it both challenging and crucial to optimize the image processing algorithms. As the image resolution and the complexity of algorithms increase, the conventional approaches of software implementations of image processing algorithms are not able to handle these challenges. One clear example is medical imaging where high performance image processing is a necessary requirement to maintain high patient throughput and thus, high quality care. The urgent need for optimizing the medical imaging algorithms have been frequently reported from both industry and academia. As an example, the processing times of 1 minute [1], 7 minutes [2], and even 60 minutes [3] are quite common for processing volume data in medical imag- ing. Considering the high volume of data to be processed, these reported long processing times introduce significant patient throughput bottlenecks that have a direct negative impact on access to timely quality medical care. Therefore, accelerating medical imaging algorithms will certainly have a significant impact on the quality of medical care by shortening the patients’ access time. Other examples include security, navigation, multimedia, industrial inspection, and astrophysics where high-performance image processing is crucial to meet performance requirements. Generally, there are two fundamental methods for algo- rithm optimization: algorithmic optimization and parallel processing. Algorithmic optimization which is a fundamental technique aims at reducing the number of operations used in an algorithm by decreasing the number of steps that the algorithm requires to take. Parallel processing breaks down an algorithm into processes that can be run in parallel while preserving the data dependencies among the operations. In both schemes, the building blocks of the optimization methods are the operations where the former reduces the number of operations and the latter runs them in parallel. In both cases, the input data is somewhat ignored. In other words, the algorithmic optimization will be done in the same way regardless of the input data type. Similarly, running the operations in parallel is independent of the input data. Window Memoization, introduced in [4], is a new optimization technique which can be used in conjunction with either of these two optimization methods. This new technique considers the characteristics of the input data, image data, to reduce the number of operations. Window memoization is based on reuse or memoiza- tion concept. Memoization is an optimization method for computer programs which avoids repeating the function calls for previously seen input data. Window memoization applies the general concept of memoization to image pro- cessing algorithms by exploiting the image data redundancy and increases the performance of image processing signifi- cantly [4]. The main initiative behind window memoization is to reduce the amount of computations that an image processing algorithm must perform. The underlying basis of reduction is to remove the redundant computations; the computations that are not necessary to perform in order to complete an image processing task. Analogous to image compression algorithms that exploit data redundancy to reduce the size of images, computational redundancy can be used to reduce the amount of computations and hence, to improve the performance of image processing algorithms. In this work, we investigate the underlying roots of