# HG changeset patch # User fsavard # Date 1272633920 14400 # Node ID 0282882aa91fd0f1324a99ca937ef5a598020a9a # Parent 5f9d04dda7070cf1dec288f549df1a65c2cbf5b7 Completed the pinch transformation text diff -r 5f9d04dda707 -r 0282882aa91f writeup/techreport.tex --- a/writeup/techreport.tex Thu Apr 29 18:26:30 2010 -0400 +++ b/writeup/techreport.tex Fri Apr 30 09:25:20 2010 -0400 @@ -121,9 +121,9 @@ Mathematically, for a square input image, think of drawing a circle of radius $r$ around a center point $C$. Any point (pixel) $P$ belonging to that disk (region inside circle) will have its value recalculated by taking the value of another "source" pixel in the original image. The position of that source pixel is found on the line thats goes through $C$ and $P$, but at some other distance $d_2$. Define $d_1$ to be the distance between $P$ and $C$. $d_2$ is given by $d_2 = sin(\frac{\pi{}d_1}{2r})^{-pinch} \times d_1$, where $pinch$ is a parameter to the filter. -If the image is not square +If the region considered is not square then, before computing $d_2$, the smallest dimension (x or y) is stretched such that we may consider the region as if it was square. Then, after $d_2$ has been computed and corresponding components $d_2\_x$ and $d_2\_y$ have been found, the component corresponding to the stretched dimension is compressed back by an inverse ratio. -The actual value is given by bilinear interpolation considering the pixels around the (non-integer) source position. +The actual value is given by bilinear interpolation considering the pixels around the (non-integer) source position thus found. The value for $pinch$ in our case was given by sampling from an uniform distribution over the range $[-complexity, 0.7 \times complexity]$.