OpenCV&Qt的两种放大缩小图像的方法

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

        Mat temImage;
        cv::resize(curImage, temImage, Size(curImage.cols*2, curImage.rows*2), INTER_LINEAR);
        curImage = temImage.clone();
        displayMat(curImage);
//        qreal width = curPix.width() * 2;  //
//        qreal height = curPix.height() * 2;
//        curPix = curPix.scaled(width, height,Qt::KeepAspectRatio);
//        ui->label->setPixmap(curPix);  //消耗CPU
//        ui->label->resize(ui->label->pixmap()->size());  //设置img大小,
//        ui->label->show();

--

转载于:https://my.oschina.net/u/3919756/blog/1939359

你可能感兴趣的:(OpenCV&Qt的两种放大缩小图像的方法)