Homework 5 - Projective Warping

Written by Austin Hines  |  Friday, 13 November 2009
Rate this item
(0 votes)

Engage Warp!

 USS Enterprise Traveling at Warp
The Original Image

For Homework 5, we designed a program that would take user input and perform simple transformations or "warps" on an image. 

SUPER-SAMPLED!

Since I completed this homework after I completed Homework 6, I decided to incorporate the super-sampling and bilinear interpolation techniques I developed for that assignment into this one. 

Below you'll find that some transformations have up to three images listed. I developed my super-sampling algorithm to work with multiple convolution filter files, and so I conducted several experiments to see how the different filters responded under different circumstances. 

Filters 

Here are some representations of the convolution kernels of the filters I used for super-sampling. Imagine that the pixel we are going to sample lies at the centermost element in the filter. The numbers indicate the relative weighting that each of the sample point's color values will have in the final color value of the pixel. 

For operations that shrink or "minify" image elements, such as scale, perspective and skew, increasing the samples of the output pixels can help include more of the original input pixel information that would have otherwise been lost in the shrinkage. 

Triangle 3 Filter

1 2 1
2 4 2
1 2 1

9 Samples Per Pixel
Bell Filter

1   4  10  16  19  16  10  4  1
4  16  40  64  76  64  40 16  4
10 40 100 160 190 160 100 40 10
16 64 160 256 304 256 160 64 16
19 76 190 304 361 304 190 76 19
16 64 160 256 304 256 160 64 16
10 40 100 160 190 160 100 40 10
 4 16  40  64  76  64  40 16  4
 1  4  10  16  19  16  10  4  1

81 Samples Per Pixel

 However, as you might imagine, calculating 81 sample coordinates per pixel significantly increases image processing time, especially for larger images. As you'll notice in the images below, there's not much difference in appearance between the triangle and bell filter outputs, however actual calculation time was painfully long, in some cases approaching a minute per image. 

Translation
t -20 40
Standard - Tran...
Standard - Trans Standard - Trans
Rotation
r 45
Standard - Rota...
Standard - Rotation Standard - Rotation
SS - Triangle -...
SS - Triangle - Rotation SS - Triangle - Rotation
SS - Bell - Rot...
SS - Bell - Rotation SS - Bell - Rotation
Scale
s .5 1.5
Standard - Scal...
Standard - Scale Standard - Scale
SS - Triangle -...
SS - Triangle - Scale SS - Triangle - Scale
SS - Bell - Sca...
SS - Bell - Scale SS - Bell - Scale
Shear
h .3 .1
Standard - Shea...
Standard - Shear Standard - Shear
SS - Triangle -...
SS - Triangle - Shear SS - Triangle - Shear
SS - Bell - She...
SS - Bell - Shear SS - Bell - Shear
Flip
f 1 0
Standard - Flip
Standard - Flip Standard - Flip
Perspective
p .001 .0003
Standard-Perspe...
Standard-Perspective Standard-Perspective
SS-Tent-Perspec...
SS-Tent-Perspective SS-Tent-Perspective
SS-Bell - Persp...
SS-Bell - Perspective SS-Bell - Perspective

Perspective
- Aggrivated

p .009 .0009
Standard - Pers...
Standard - Perspective - Aggressive Standard - Perspective - Aggressive
SS - Tent - Per...
SS - Tent - Perspective - Aggressive SS - Tent - Perspective - Aggressive
SS - Bell - Per...
SS - Bell - Perspective - Aggressive SS - Bell - Perspective - Aggressive
Multiple
r -20
s .8 1.2
p .0001 .0003
h .4 .1
Standard - Mult...
Standard - Multiple Standard - Multiple
SS-Tent-Multipl...
SS-Tent-Multiple SS-Tent-Multiple
SS-Bell - Multi...
SS-Bell - Multiple SS-Bell - Multiple

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Monday, 01 February 2010 05:26

Add comment