In keras it is possible to use UpSampling2D layer to up-sample an image. You can use Bilinear Interpolation.

Given an image ${h\times w}$ it is possible to increase its size in ${h*k\times w*l}$, where $k$ and $l$ are factors greater than or equal to $1$.

I understand the Bilinear Interpolation formula applied to $4$ neighbouring pixels (${2\times 2}$ sub-matrix). But I just can't figure out how to apply it to perform up-sampling. What is the actual algorithm being implemented? How is Bilinear Interpolation mathematically defined for up-sampling 2D images?

Nowhere have I found the real algorithm, no one explains how to construct the new matrix correctly and consistently. It is always explained in an incomprehensible way, please help me.

  • $\begingroup$ This is an interesting question, and I think you might have better luck on the signal processing Stack: dsp.stackexchange.com $\endgroup$
    – Dave
    Mar 12, 2021 at 20:35
  • 1
    $\begingroup$ ehm, surely you have already looked at this, right? en.wikipedia.org/wiki/Bilinear_interpolation I mean, the formula is there $\endgroup$ Mar 12, 2021 at 20:38
  • $\begingroup$ ok thanks, then I ask the question about Signal Processing Stack $\endgroup$ Mar 12, 2021 at 20:43
  • $\begingroup$ Yes, I have already seen on the wikipedia page, it does not specify exactly how the up-sampling is performed $\endgroup$ Mar 12, 2021 at 20:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.