使用线性插值更改图像大小
我想使用线性插值将图像从宽度= 500更改为宽度= 100。
我该怎么做?
I want to change an image from lets say width=500 to width=100, using linear interpolation.
How can I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
cv ::调整
来调整图像大小。interpolation
参数可以设置为cv :: Inter_linear
线性插值。代码示例:
请参阅 和
您还可以在此处查看针对各种情况的推荐插值方法:最适合调整图像的大小吗?。
You can use
cv::resize
to resize the image. Theinterpolation
parameter can be set tocv::INTER_LINEAR
for linear interpolation.Code example:
See the documentation for
cv::resize
, and interpolation options.You can also see recommended interpolation method for various cases here: Which kind of interpolation best for resizing image?.