双线性插值bilinear interpolation

 

线性插值,双线性插值Bilinear Interpolation算法

https://blog.csdn.net/xbinworld/article/details/65660665

https://blog.csdn.net/xjz18298268521/article/details/51220576

图像处理常用插值方法总结

https://cloud.tencent.com/developer/article/1082360

http://www.1zlab.com/wiki/python-opencv-tutorial/opencv-interpolation-algrithm/

1前言

关于中心对齐,网上找到的资料都是错的,只好参考一下自己写吧。

 

2线性插值

这里写图片描述

线性插值,即已知两点(x0,y0),(x1,y1)和之间某点的一维坐标x,求该点的另一维y。

例如:

(x0,y0)=(2,6),

(x1,y1)=(5,15)

求:

(x, y)=(3, ?)

公式1:斜率方式

y=y_0 + \Delta x \cdot k \\ \\ \\ =y_0+(x-x_0)\frac{y_1 - y_0}{x_1 - x_0}

=6+1*\frac{9}{3}=9

公式2:距离比例方式

y=\frac{x_1 - x}{x_1 - x_0}y_0+\frac{x - x_0}{x_1 - x_0}y_1

=\frac{5 - 3}{5 - 2}\cdot 6+\frac{3 - 2}{5 - 2}\cdot 15 = 4+5=9

小结

两个公式结果相同,实际上两者是等价的。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值