-4

May I know how can I do the interpolation for a matrix in C++? Eg: I have a 3x3 matrix {0 0 0
0 1 1 0 0 1} I wish to resize it to a 10x10 matrix using bilinear interpolation.

Any tips or references about this?

AndreyAkinshin
  • 18,603
  • 29
  • 96
  • 155

2 Answers2

2

What you want to do is called image resizing using bilinear interpolation. Knowing that google is your friend. I would try using a C++ library for that purpose. This question covers all C++ imaging libraries: Fastest C/C++ image resizing library Any reasonable library should satisfy your needs.

Community
  • 1
  • 1
carlosdc
  • 12,022
  • 4
  • 45
  • 62
0

In order to linearly interpolate between two things you need to embed (put) them in a common vector space and then "draw" the line between them.

I can't see a useful embedding of a 3x3 matrix and a 10x10 matrix in a common vector space...

Petar Ivanov
  • 91,536
  • 11
  • 82
  • 95