如何使用imshow在多个窗口中显示多个图像? [英] How can I use imshow to display multiple images in multiple windows?

查看:551
本文介绍了如何使用imshow在多个窗口中显示多个图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想执行以下操作,以便在屏幕上显示两个图像:

I would like to do something like the following in order to display two images on the screen:

imshow("1", img1);
imshow('2', 'img2');

有可能这样做吗?

谢谢!

推荐答案

是的,有可能.函数void imshow(const string& winname, InputArray mat)在指定窗口中显示图像,其中-

Yes, it is possible. The function void imshow(const string& winname, InputArray mat) displays an image in the specified window, where -

  • winname –窗口名称.
  • 图像-要显示的图像.

该窗口由其名称标识.因此,要在两个不同的窗口中显示两个图像(img1,img2);使用具有不同名称的imshow,例如:-

The window is identified by its name. So to display two images(img1, img2), in two different window; use imshow with different name like :-

imshow("1",img1);
imshow("2",img2);

这篇关于如何使用imshow在多个窗口中显示多个图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆