Mat ResImg;
cvtColor(srcimg, ResImg, COLOR_BGR2GRAY);
QImage disImage;
matToQImage(ResImg, disImage);
ui.labelResult->setPixmap(QPixmap::fromImage(disImage));
ui.labelResult->setScaledContents(true);
关注公众号,更多知识内容
Mat ResImg;
cvtColor(srcimg, ResImg, COLOR_BGR2GRAY);
QImage disImage;
matToQImage(ResImg, disImage);
ui.labelResult->setPixmap(QPixmap::fromImage(disImage));
ui.labelResult->setScaledContents(true);
关注公众号,更多知识内容