函数原型:
C++: void blur(InputArray src, OutputArray dst, Size ksize, Point anchor=Point(-1,-1), int borderType=BORDER_DEFAULT )
void OpenCVStudy::slot_ProcessImage()
{
Mat ResImg;
//转灰度图
//cvtColor(srcimg, ResImg, COLOR_BGR2GRAY);
blur(srcimg, ResImg, Size(9, 9), Point(-1, -1));
QImage disImage;
matToQImage(ResImg, disImage);
ui.labelResult->setPixmap(QPixmap::fromImage(disImage));
ui.labelResult->setScaledContents(true);
}
关注公众号,更多知识内容