[Solved] Pyramidal Histogram Of Oriented Gradients – Trilinear interpolation


Short answer is: you can’t apply Trilinear Inerpolation.

Let’s start with 2x2x2 blocks. Each block, is represented by it’s centre pixel ( 1,2,3,4 in ugly yellow on my sketch). Each pixel is located at the corner of a cell.

A pixel (the red dot), will be shared by up to 4 blocks that overlap.

enter image description here

With 3x3x2 block each block centre pixel will be also a cell centre pixel. And each cell pixel will be shared with up to 9 blocks.

enter image description here

You can’t use Trilinear interpolation. multilinear interpolations require 2^D samples. So you’ll need to choose a different way to assign the weights.

Remember that we’re not interested in interpolating values, but using the interpolation coefficients as weights.

Some options that you may use (haven’t tested them).

  • Inverse distance weighting: (trivial and easy, but I remember Euclidean norms didn’t work work well with images, still give it a chance)

  • Go 4x4x2 and use bicubic interpolation + linear for the 3rd dimension.

  • Check if it’s possible to obtain weight out of Lagrange or cubic spline polynomials.

  • Use QR decomposition to find a linear solution for the overfitted problem.

2

solved Pyramidal Histogram Of Oriented Gradients – Trilinear interpolation