AnsweredAssumed Answered

Relative position between 2 images for interpolation?

Question asked by ash on Aug 1, 2013
Latest reply on Aug 1, 2013 by ash

Hi everybody,

I want to change an image's scale.

I read some theory about bilinear interpolation and wanted to use it in OpenCL.

So my images are CL_FLOAT in greyscale - CL_LUMINANCE. And my sampler is described as following :

sampler_t smp = CLK_NORMALIZED_COORDS_FALSE |//Natural coordinates

CLK_ADDRESS_CLAMP |//Clamp to zeros

CLK_FILTER_LINEAR;//Linear

But I get different values compared to the CPU implementation.

My question is when you're looking for the value of a pixel in the destination image, how do you find the position in the source image.

Because each image has its own point of origin ( 0,0) which is the top left corner. How do you know the relative position between 2 images?

 

Best regards,

ash

Outcomes