Lecture 5: Texture (54)
jayc809

I think the way bilinear filtering works is very intuitive in the sense that the closer the target is to a pixel, the more the pixel contributes to the final value. Especially in this graphic, where we can see how each pixel contributes proportionally from an area perspective instead of just numbers. It makes a lot of sense because as humans we are viewing the screen and each pixel as a 2D area. Of course, this method is not without its flaws. For example, if we were to bilinearly filter an image with sharp edges and high frequency, this will end up blurring the image.

grafour

is the lerp function returning a value that kind of takes the average of v0 and v1? I'm a little confused as to how exactly bilinear filtering works. I think right now I'm just thinking of it like a big average function that is adjusted according to where u1 lands.

Boomaa23

Why do we use u1 and u0 here? Would that not give an interpolation of only the y position of the point? Do we need another set of lerp helpers for the x direction? I'd assume that we would, but it appears that we find an f(x, y) here from just the two u0 and u1.

Mehvix

@Boomaa23 u0 is weighted sum of (u00, u10) proportional to ss (horizontal distance); u1 is the horizontal counterpart over (u01, u11). These are then weighted proportional to ss (vertical distance).

agao25

Professor Ren mentioned how you could rewrite this lerp method to use weights with the the four u points surrounding the red point, which seems incredibly similar to Barycentric coordinates and utilizing the 3 vertices of a triangle to locate a point inside the triangle. I think a weighted sum method for bilinear filtering probably might require some other equations to account for more unknowns (something like an alpha + beta + gamma = 1, the s & t), but this lerp method seems faster and easier

You must be enrolled in the course to comment