Rapid image stitching with preview capabilities
Multiple digital image tiles are stitched together into a single digital image through use of reactive alpha mask generation, allowing for efficient tile rearrangement and preview capabilities. The present invention features a method for stitching a first image tile and a second image tile to display a preview of a stitched image through use of alpha masking. The method may comprise arranging the first image tile and the second image tile into an initial image display, aligning the first image tile and the second image tile of the initial image display such that shared pixel regions of the first image tile overlap those of the second image tile, stitching the aligned first image tile to the aligned second image tile, applying the alpha blending mask of the stitched image to the initial image display, and displaying the initial image display with the alpha blending mask applied.
1 . A method for stitching a first image tile and a second image tile to display a preview of a stitched image through use of alpha masking, the method comprising:
a. arranging the first image tile and the second image tile, wherein the first image tile comprises a plurality of pixel regions that correspond to a plurality of pixel regions of the second image tile, resulting in an initial image;
wherein the first image tile corresponds to a first alpha blending mask;
wherein the second image tile corresponds to a second alpha blending mask:
b. aligning the first image tile and the second image tile of the initial image into an initial stitching configuration such that one or more first pixel regions of the plurality of pixel regions of the first image tile overlap corresponding one or more first pixel regions of the plurality of pixel regions of the second image tile;
c. recalculating the first alpha blending mask and the second alpha blending mask in the initial stitching configuration;
d. realigning the first image tile and the second image tile into a desired stitching configuration different from the initial stitching configuration such that one or more second pixel regions of the plurality of pixel regions of the first image tile overlap corresponding one or more second pixel regions of the plurality of pixel regions of the second image tile;
e. recalculating the first alpha blending mask and the second alpha blending mask in the desired stitching configuration;
f. applying the first alpha blending mask and the second alpha blending mask of the stitched image to the initial image through an image stitching algorithm;
g. displaying the initial image with the first alpha blending mask and the second alpha blending mask applied, resulting in the preview of the stitched image;
h. toggling the first alpha blending mask and the second alpha blending mask off, such that the initial image is displayed; and
i. toggling the first alpha blending mask and the second alpha blending mask on, such that the preview of the stitched image is displayed.
2 . The method of claim 1 further comprising:
a. storing the initial image in a graphic processing unit (GPU) image buffer; and
b. retrieving, before applying the first alpha blending mask and the second alpha blending mask, the initial image from the GPU image buffer.
3 . The method of claim 1 further comprising:
a. storing the first alpha blending mask and the second alpha blending mask in a graphic processing unit (GPU) alpha buffer; and
b. retrieving the first alpha blending mask and the second alpha blending mask from the GPU alpha buffer to be applied to the initial image.
4 . The method of claim 1 , wherein aligning the first image tile and the second image tile comprises rotation, translation, scaling, or a combination thereof.
5 . The method of claim 1 , wherein displaying the initial image with the first alpha blending mask and the second alpha blending mask applied comprises transmitting the initial image with the first alpha blending mask and the second alpha blending mask to the display component.
6 . The method of claim 5 , wherein the display component is selected from a group comprising a monitor, a tablet, and a mobile device.
7 . A system for stitching a first image tile and a second image tile to display a preview of a stitched image through use of alpha masking, the system comprising:
a. a computing device comprising:
i. a display component;
ii. a central processing unit (CPU);
iii. a graphic processing unit (GPU); and
iv. a memory component comprising computer-readable instructions for:
A. arranging, by the CPU, the first image tile and the second image tile, wherein the first image tile comprises a plurality of pixel regions that correspond to a plurality of pixel regions of the second image tile, resulting in an initial image display;
wherein the first image tile corresponds to a first alpha blending mask;
wherein the second image tile corresponds to a second alpha blending mask:
B. aligning, by the CPU, the first image tile and the second image tile of the initial image into an initial stitching configuration such that one or more first pixel regions of the plurality of pixel regions of the first image tile overlap corresponding one or more first pixel regions of the plurality of pixel regions of the second image tile;
C. recalculating the first alpha blending mask and the second alpha blending mask in the initial stitching configuration;
D. realigning, by the CPU, the first image tile and the second image tile into a desired stitching configuration different from the initial stitching configuration such that one or more second pixel regions of the plurality of pixel regions of the first image tile overlap corresponding one or more second pixel regions of the plurality of pixel regions of the second image tile;
E. recalculating, by the CPU, the first alpha blending mask and the second alpha blending mask of the aligned image tiles in the desired stitching configuration;
F. transmitting the aligned image tiles, the first alpha blending mask, and the second alpha blending mask to the GPU;
G. accepting, by the GPU ( 300 ), the aligned image tiles, the first alpha blending mask, and the second alpha blending mask from the CPU;
H. stitching, by the GPU, the aligned first image tile to the aligned second image tile through an image stitching algorithm, the first alpha blending mask, and the second alpha blending mask, resulting in the stitched image;
I. displaying, by the display component, the initial image with the first alpha blending mask and the second alpha blending mask applied, resulting in the preview of the stitched image;
J. toggling the first alpha blending mask and the second alpha blending mask off, such that the initial image is displayed; and
K. toggling the first alpha blending mask and the second alpha blending mask on, such that the preview of the stitched image is displayed.
8 . The system of claim 7 , wherein the memory component further comprises computer-readable instructions for:
a. storing the initial image in a GPU image buffer; and
b. retrieving, before applying the first alpha blending mask and the second alpha blending mask, the initial image from the GPU image buffer.
9 . The system of claim 7 , wherein the memory component further comprises instructions for:
a. storing the first alpha blending mask and the second alpha blending mask in a GPU alpha buffer; and
b. retrieving the first alpha blending mask and the second alpha blending mask from the GPU alpha buffer to be applied to the initial image.
10 . The system of claim 7 , wherein the display component is selected from a group comprising a monitor, a tablet, and a mobile device.
11 . The system of claim 7 , wherein aligning the first image tile and the second image tile comprises rotation, translation, scaling, or a combination thereof.
12 . The system of claim 7 , wherein the computing device is selected from a group comprising a smart device, a personal computing device, and a cloud computing device.
13 . A non-transitory computer-readable storage medium for stitching a first image tile and a second image tile to display a preview of a stitched image through use of alpha masking, the system comprising:
a. a computer-readable code, which when executed by a processing computing device, causes the processing computing device to:
i. arrange the first image tile and the second image tile, wherein the first image tile comprises a plurality of pixel regions that correspond to a plurality of pixel regions of the second image tile, resulting in an initial image;
wherein the first image tile corresponds to a first alpha blending mask;
wherein the second image tile corresponds to a second alpha blending mask:
ii. align the first image tile and the second image tile of the initial image into an initial stitching configuration such that one or more first pixel regions of the plurality of pixel regions of the first image tile overlap corresponding one or more pixel regions of the plurality of pixel regions of the second image tile;
iii. recalculate the first alpha blending mask and the second alpha blending mask of the aligned image tiles in the initial stitching configuration;
iv. realigning the first image tile and the second image tile into a desired stitching configuration different from the initial stitching configuration such that one or more second pixel regions of the plurality of pixel regions of the first image tile overlap corresponding one or more second pixel regions of the plurality of pixel regions of the second image tile;
v. recalculate the first alpha blending mask and the second alpha blending mask of the aligned image tiles in the desired stitching configuration;
vi. stitch the aligned first image tile to the aligned second image tile through an image stitching algorithm, the first alpha blending mask, and the second alpha blending mask, resulting in the stitched image;
vii. display the initial image with the first alpha blending mask and the second alpha blending mask applied, resulting in the preview of the stitched image;
viii. toggle the first alpha blending mask and the second alpha blending mask off, such that the initial image is displayed; and
ix. toggle the first alpha blending mask and the second alpha blending mask on, such that the preview of the stitched image is displayed.
14 . The non-transitory computer-readable storage medium of claim 13 further comprising computer-readable code, which when executed by a processing computing device, causes the processing computing device to:
a. store the initial image in an image buffer; and
b. retrieve, before applying the first alpha blending mask and the second alpha blending mask, the initial image from the image buffer.
15 . The non-transitory computer-readable storage medium of claim 13 further comprising computer-readable code, which when executed by a processing computing device, causes the processing computing device to:
a. store the first alpha blending mask and the second alpha blending mask in an alpha buffer; and
b. retrieve the first alpha blending mask and the second alpha blending mask from the alpha buffer to be applied to the initial image.
16 . The non-transitory computer-readable storage medium of claim 13 , wherein aligning the first image tile and the second image tile comprises rotation, translation, scaling, or a combination thereof.