请教大神,如何将mat数据在opengl里面画出来?
如题。
resize(rgba, image, Size(rgba.cols / 2, rgba.rows / 2), INTER_LINEAR);
//检测图像运动
if (foreGround.empty())
foreGround.create(image.size() , image.type());
//得到前景图像,是黑白灰 3种灰度值的图
pMog->apply(image, fgMask, 0);//计算前景mask图像
// 下面是根据前景图的操作,和原图像融合得到有纹理的前景图
GaussianBlur(fgMask, fgMask, Size(5, 5) , 0);
threshold(fgMask , fgMask, 10, 255, THRESH_BINARY);
// 将foreGraound 所有像素置为0
foreGround = Scalar::all(0);
//fgMask对应点像素值为255则 foreGround像素为image里的像素,为0则直接为0
image.copyTo(foreGround, fgMask);
我如何将foreground在opengl里面画出来?