请教大神,如何将mat数据在opengl里面画出来?

xiaopan 2017-09-11 08:45:27
如题。
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里面画出来?
...全文
1574 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaopan 2017-09-11
  • 打赏
  • 举报
回复
Mat image, foreGround;

602

社区成员

发帖
与我相关
我的任务
社区描述
异构开发技术
社区管理员
  • OpenCL和异构编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧