Image Warping / Texture Mapping
  Home FAQ Contact Sign in
comp.graphics.api.opengl only
 
Advanced search
POPULAR GROUPS

more...

comp.graphics.api.opengl Profileā€¦
 Up
Image Warping / Texture Mapping         


Author: IanSashaB
Date: Sep 29, 2006 21:35

Hello,

I'm confused about the differences between image warpping and texture
mapping. What I want to do is take an image (abritary polygon -
trapezoid chunk of the image) and warp/texure it onto another polygon -
trapezoid.
i.e. I want to port the Intel IPP function:
ippiWarpPerspectiveQuad_8u_C1R and hopefully speed it up in opengl

ftp://download.intel.com/support/performancetools/libraries/ipp/ippiman.pdf

The function takes a source quad (texture) and a destination quad
(vertex) and performs the warp:

x = (c00 *u + c01 *v + c02)/(c20* u + c21 *v + c22);
y = (c10 *u + c11 *v + c12)/(c20* u + c21 *v + c22);

// Intel code segment
const double dstQuad1[4][2] = { xa0 ,ya0, xb0, yb0, xc0, yc0, xd0, yd0
};
const double srcQuad1[4][2] = { xp10, yp10, xp20, yp20, xp30, yp30,
xp40, yp40 };
Show full article (1.74Kb)
2 Comments
Re: Image Warping / Texture Mapping         


Author: jbwest
Date: Sep 30, 2006 03:27

gmail.com> wrote in message
news:1159558516.507165.181740@e3g2000cwe.googlegroups.com...
> Hello,
>
> I'm confused about the differences between image warpping and texture
> mapping. What I want to do is take an image (abritary polygon -
> trapezoid chunk of the image) and warp/texure it onto another polygon -
> trapezoid.
> i.e. I want to port the Intel IPP function:
> ippiWarpPerspectiveQuad_8u_C1R and hopefully speed it up in opengl
>
> ftp://download.intel.com/support/performancetools/libraries/ipp/ippiman.pdf
>
> The function takes a source quad (texture) and a destination quad
> (vertex) and performs the warp:
>
> x = (c00 *u + c01 *v + c02)/(c20* u + c21 *v + c22);
> y = (c10 *u + c11 *v + c12)/(c20* u + c21 *v + c22);
>
> // Intel code segment ...
Show full article (2.06Kb)
1 Comment
Re: Image Warping / Texture Mapping         


Author: Andy V
Date: Sep 30, 2006 04:31

> gmail.com> wrote in message
> news:1159558516.507165.181740@e3g2000cwe.googlegroups.com...
>> Hello,
>>
>> I'm confused about the differences between image warpping and texture
>> mapping. What I want to do is take an image (abritary polygon -
>> trapezoid chunk of the image) and warp/texure it onto another polygon -
>> trapezoid.
>...

jbwest wrote:
> subdivide the quad. OpenGL only does linear interpolation of triangle corner
> coordinates.

Another way to look at this is that OpenGL needs quads (and polygons in
general) to be planar in all attributes
-- vertices, colors, texture
coordinates, etc.

--
Andy V
no comments