In place rotation of images for low memory systems
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.
1 Assignment
0 Petitions
Accused Products
Abstract
Rotation in the storage domain is a one-one function with the domain equal to the range. This permits an image to be rotated in place. Each image size implies at least one garland of closed chains of pixels. Each image includes a spanning set of these garlands. Rotation in place moves each pixel to the next location on its garland. On completion of a garland by return to the initial pixel, pixels on the next garland are moved. Image rotation is complete after all the garlands have been traversed.
43 Citations
16 Claims
-
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 include filling 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, and changing 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 Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. 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 set of tiles encompassing said original image; rearranging pixels within plural data words spanning each tile, dividing rearranged pixels into plural super-pixels of contiguous pixels; 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 tile in said original image to an intermediate memory location of said initial tile in said rotated image and subsequent chain links from a prior intermediate memory location of a prior intermediate tile in the original image to a further intermediate memory location of said prior intermediate tile in said rotated image, until said further intermediate memory location returns to said memory location of said initial tile, said spanning set of garlands together identifying all data movement necessary to transform said original image into said rotated image by moving each tile only once from a memory location in said original image to a memory location in said rotated image; identifying an initial super-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 super-pixel for each of the identified garlands include filling an image buffer having dimensions equal to dimensions of the image in tiles with zeros, initializing a garland count to 1, and repetitively until all tiles of the image buffer are non-zero; searching the image buffer for a first tile equal to zero, storing the garland count in the first tile, calculating a memory location of a next tile in a current garland, detecting whether a next tile at the calculated memory location in the current garland is an initial tile in the current garland, if the next tile is not the initial tile in the current garland, storing the garland count at the next tile and repeating the steps of calculating, detecting and storing until the next tile is the initial tile in the current garland, if the next tile is the initial tile 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 tile, whereupon the current garland count corresponds to the number of garlands in the image and each first tile memory location corresponds to the initial super-pixel for a corresponding garland; for each in each identified garland starting at the corresponding identified initial super-pixel; storing a current super-pixel, calculating the memory location of a next super-pixel in the corresponding garland, recalling a next super-pixel from the calculated memory location in the memory, storing the recalled next super-pixel, saving the stored super-pixel into the memory at the calculated memory location, and changing the next super-pixel into the current super-pixel and repeating for all super-pixels in said closed path of chain links of each garland of the spanning set of garlands. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15, 16)
-
Specification