在一个OpenCV中显示不同的窗口
display different window in one OpenCV
由于我在opencv中的应用程序,我有三个绝缘窗口显示,我希望通过将三个放在一个窗口中并且具有不同的大小,我如何才能做到这一点铛你
在OpenCV中你只能做到这一点那就是创建一个巨大的cv::Mat它由三个图像组成并显示矩阵,这可以这样做:
cv::Size s1 = img1.size();
cv::Size s2 = img2.size();
cv::Size s3 = img3.size();
cv::Mat output(s1.height, s1.width + s2.width + s3.width, CV_MAT_TYPE); // put in the type of your mat
cv::Mat help1(output, cv::Rect(0,0, s1.width, s1.height);
cv::Mat help2(output, cv::Rect(s1.width, 0, s2.width, s2.height);
cv::Mat help3(output, cv::Rect(s1.width + s2.width, 0, s3.width, s3.height);
img1.copyTo(help1);
img2.copyTo(help2);
img3.copyTo(help3);
cv::imshow("Output", output);
我认为这在OpenCV中是不可能的:http://docs.opencv.org/modules/highgui/doc/user_interface.html?highlight=show
您可以尝试手动复制单个cv::Mat
中的不同图像并将其提供给imshow
相关文章:
- 使用 while 循环时不显示窗口
- 有没有办法拿一个opencv显示窗口并将其保存到GUI窗口?
- SDL视频显示窗口:如何连接窗口关闭事件回调
- Qt:缓慢启动时显示窗口内容
- 为什么MessageBox在我创建的桌面中显示窗口,而AllocConsole在上一个桌面中显示它
- 如何显示窗口大小不同的输出图像?通过使用 cv::Mat
- QMLApplicationViewer 多个实例仅首先显示窗口
- 为什么HWND_NOTTOPMOST无法在xp中显示窗口前景
- 基本C++SFML显示窗口错误
- 使用Richedit控件时,基于对话框的Win32 API程序将不会显示窗口
- 显示窗口的极简主义Visual C++应用程序
- Win32:是否可以显示窗口,但在任务栏中隐藏它
- OpenCV-关闭图像显示窗口
- IWebBrowser2在渲染完成后显示窗口
- 防止在调用SDL_SetVideoMode后显示窗口
- 如何使用rad studio显示窗口总数
- Opencv highgui显示窗口
- 使用sfml显示窗口
- 跨平台c++库/库:显示窗口,在屏幕上渲染2D形状,在屏幕上渲染文本
- 用于创建菜单栏的c++ win32程序(程序编译并运行,也显示窗口但不显示菜单栏)