×

In place rotation of images for low memory systems

  • US 7,782,341 B2
  • Filed: 03/08/2006
  • Issued: 08/24/2010
  • Est. Priority Date: 03/08/2005
  • Status: Active Grant
First Claim
Patent Images

1. A method of in-place image rotation of an image stored in a memory from an original image to a rotated image comprising the steps of:

  • identifying a spanning set of garlands corresponding to said original image, each garland consisting of a closed path of chain links including an initial chain link from a memory location of an initial pixel in said original image to an intermediate memory location of said initial pixel in said rotated image and subsequent chain links from a prior intermediate memory location of a prior intermediate pixel in the original image to a further intermediate memory location of said prior intermediate pixel in said rotated image, until said further intermediate memory location returns to said memory location of said initial pixel, said spanning set of garlands together identifying all data movement necessary to transform said original image into said rotated image by moving each pixel only once from a memory location in said original image to a memory location in said rotated image;

    identifying an initial pixel for each of the identified garlands;

    said steps of identifying a spanning set of garlands corresponding to an initial image and identifying an initial pixel for each of the identified garlands includefilling an image buffer having dimensions equal to dimensions of the image with zeros,initializing a garland count to 1, and repetitively until all pixels of the image buffer are non-zero;

    searching the image buffer for a first pixel equal to zero,storing the garland count in the first pixel,calculating a memory location of a next pixel in a current garland,detecting whether a next pixel at the calculated memory location in the current garland is an initial pixel in the current garland,if the next pixel is not the initial pixel in the current garland, storing the garland count at the next pixel and repeating the steps of calculating, detecting and storing until the next pixel is the initial pixel in the current garland,if the next pixel is the initial pixel in the current garland, incrementing the garland count and repeating the steps of searching, storing, calculating, detecting and storing until the step of searching fails to find a zero pixel, whereupon the current garland count corresponds to the number of garlands in the image and each first pixel memory location corresponds to the initial pixel for a corresponding garland;

    for each pixel in each identified garland starting at the corresponding identified initial pixel;

    storing a current pixel,calculating the memory location of a next pixel in the corresponding garland,recalling a next pixel from the calculated memory location in the memory,storing the recalled next pixel,saving the stored pixel into the memory at the calculated memory location, andchanging the next pixel into the current pixel and repeating for all pixels in said closed path of chain links of each garland of the spanning set of garlands.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×