Closed Vaalizaadeh closed 6 years ago
@Vaalizaadeh I don't think it matters because I end up clipping the 4 corner coordinates before sampling. So suppose a certain coordinate lies outside the image range.
x
before grabbing the 4 corner points, I'll have that x0 = max_x
and x1 = max_x + 1
after which I'll clip again and obtain x0 = x1 = max_x
. x0 = some_value_greater_than_max_x
and x1 = some_value_greater_than_max_x + 1
after which I'll clip again and obtain x0 = x1 = max_x
.So no difference.
@kevinzakka I guess if you don't clip, the intensity of boundary locations will have wrong calculations. Take a look at the weights of the interpolation line. suppose one x
which is not clipped has a value equal to $255.5$ and the range is $255$. it may lead to wrong answers if the other coordinate lies in the plane.
Hey, man! Thanks for your implementation. I guess there is something that has to be noticed. Don't you think you have to clip the
x
in your bilinear function, too?