gaoxiang12 / slambook

MIT License
6.89k stars 3.27k forks source link

ch13中des #178

Closed happyrookie closed 5 years ago

happyrookie commented 5 years ago

双线性插值中这个语句是什么意思呢?我真心被弄糊涂了 inline double getBilinearInterpolatedValue( const Mat& img, const Vector2d& pt ) { uchar d = & img.data[ int(pt(1,0))img.step+int(pt(0,0)) ];/ 这句话什么意思呢,这个点的y坐标乘以这个图像的行所占的字节数再加上x坐标,感觉真的是有点不之所云啊,还请大家伙帮忙看看,先谢过各位了/ double xx = pt(0,0) - floor(pt(0,0)); double yy = pt(1,0) - floor(pt(1,0)); return (( 1-xx ) ( 1-yy ) double(d[0]) + xx ( 1-yy ) double(d[1]) + ( 1-xx ) yy double(d[img.step]) + xxyydouble(d[img.step+1]))/255.0; }