3

Is there any similar function that works same as

interp2(x, y, frame(:,:,z), xd, yd, '*linear', 0)

in OpenCV?

twerdster
  • 4,977
  • 3
  • 40
  • 70
Bryanyan
  • 677
  • 3
  • 13
  • 30

1 Answers1

1

The function cv::remap() does almost what you're asking for, see the documentation here.

You need to precompute the (x,y) target coordinates of the points in the input array(s) called map1 and map2 in the doc (use only one if you pack (x,y) coordinate, two otherwise). The OpenCV equivalent to '*linear' is cv::INTER_BILINEAR.

sansuiso
  • 9,259
  • 1
  • 40
  • 58