A memory efficient method for fast transposing run-length encoded images

We present a memory efficient method for transposing a run-length encoded bi-level image. Image transposing is a commonly used operation for affine transformations such as document image deskewing. The best existing method for transposing a run-length image is the pxy table based method. For images of typical engineering drawings, which are large, crowded and noisy, this method requires an exorbitant amount of memory. The method proposed uses a very compact representation of run-length encoded images. Also, it bypasses certain steps from the pxy table based method. Consequently, the saving in memory use is proportional to the number of horizontal runs and the number of vertical (transposed) runs. The computation time for both the methods is almost identical.