5. CVUI 2.7.0 组件:Image (官方文档翻译)

官方文档链接:https://dovyski.github.io/cvui/components/image/


Image

cvui::image() 可以渲染一张图像,即 cv::Mat。函数声明为:

void image(cv::Mat& theWhere, int theX, int theY, cv::Mat& theImage);

theWhere 是要渲染图像的图像/帧,theX 是 X 坐标,theY 是 Y 坐标,theImage 是将在指定位置被渲染的图像。

下面是一个示例,显示一个正在加载的图像,然后使用 cvui::image() 显示。结果如下图所示:

cv::Mat lena_face = cv::imread("lena_face.jpg", cv::IMREAD_COLOR);
cvui::image(frame, 10, 10, lena_face);

运行结果
在这里插入图片描述

发布了73 篇原创文章 · 获赞 14 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/wangyuankl123/article/details/105321591