草庐IT

三次方

全部标签

C 使用双三次方法进行图像插值

C++ImageinterpolationwithBicubicmethod我只是想通过BiCubic插值来平滑图像。我得到了一些用于插入RGB图像的代码。我已更改代码以适用于灰度图像。但结果我只得到了全黑的图像。考虑的输入和输出图像大小相同。代码粘贴在下面。请帮我。提前致谢。 inlineUint16saturate(floatx,unsignedmax_pixel){  returnx>max_pixel?max_pixel    :x0.0f?0    :Uint16(x);}inlinefloatget_subpixel(constUint16*in,std::size_tdest_w