自学内容网 自学内容网

C++ OpenCV 使用 resize() 调整图像大小

Mat Visible= imread("../pic/rgb_1.jpg");    //右图
Mat Infrared = imread("../pic/infrared_1.jpg");    //左图
if (Visible.empty() || Infrared.empty()) {
    cout << "could not load the image..." << endl;
    return -1;
}
Mat vis_1,infra_1;

//裁剪
// vis_1 = Visible(Rect(0,0,600,600)); 
// infra_1 = Infrared(Rect(0,0,600,600)); 
//resize调整大小
resize(Visible,vis_1,Size(600,600));
resize(Infrared,infra_1,Size(600,600));

参考:C++ OpenCV 使用 resize() 调整图像大小_opencv resize-CSDN博客

 opencv图像裁剪(C++)_cpp opencv 图片剪彩-CSDN博客


原文地址:https://blog.csdn.net/m0_63893772/article/details/140665758

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!