Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2018-04-06 08:18:20 -0600

Nbb gravatar image

How to interpolate an image ?

Is there an opencv python function that returns the pixel intensity at the interpolated location ? I am trying to write my own function for it but I am confused. I know how to interpolate for 1 dimensions but not 2.

def interp(x, x1, x2, fx1, fx2):
    return (x - x1)/(x2 - x1)*(fx2 - fx1) + fx1

image description

How to interpolate an image ?

Is there an opencv python function that returns the pixel intensity at the interpolated location ? I am trying to write my own function for it but I am confused. I know how to interpolate for 1 dimensions but not 2.2. It does not have to be efficient.

def interp(x, x1, x2, fx1, fx2):
    return (x - x1)/(x2 - x1)*(fx2 - fx1) + fx1

image description

How to interpolate an image ?

Is there an opencv python function that returns the pixel intensity at the interpolated location ? I am trying to write my own function for it but I am confused. I know how to interpolate for 1 dimensions but not 2. It does not have to be efficient.efficient. It's not a homework. I am just trying to implement the active contours for practice and part of it requires me to do some interpolation.

def interp(x, x1, x2, fx1, fx2):
    return (x - x1)/(x2 - x1)*(fx2 - fx1) + fx1

image description

How to interpolate an image ?

Is there an opencv python function that returns the pixel intensity at the interpolated location ? I am trying to write my own function for it but I am confused. I know how to interpolate for 1 dimensions but not 2. It does not have to be efficient. It's not a homework. I am just trying to implement the active contours for practice and understanding and part of it requires me to do some interpolation.

def interp(x, x1, x2, fx1, fx2):
    return (x - x1)/(x2 - x1)*(fx2 - fx1) + fx1

image description