图像插值
最常见的四种插值算法
INTER_NEARRST=0
INTER_LINEAR=1
INTER_CUBIC=2
INTER_LANCZOS4=4
相关应用场景
几何变换,透视变换,插值计算新像素resize,
如果size有值,使用size做缩放插值,否则根据fx与fy卷积。
void QUickdemo::resize_demo(Mat& image)
{
Mat zoomin, zoomout;
int h = image.rows;
int w = image.cols;
resize(image, zoomin, Size(w/2, h/2), 0, 0, INTER_LINEAR);
imshow("xt11", zoomin);
resize(image, zoomout, Size(w *2, h*2), 0, 0, INTER_LINEAR);
imshow("xt12", zoomout);
}