带有python和conda的openCV的扩展GUI [英] Expanded GUI for openCV with python and conda

查看:70
本文介绍了带有python和conda的openCV的扩展GUI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 opencv 3.3 python3.6.3 一起使用,该软件是在 conda 环境中安装的,有一段时间,在显示图像时(使用基本的cv2函数 imshow(例如"window name"(窗口名称),my_image)),就会在该图像上显示一个小的GUI.我还可以随意放大和缩小,甚至可以看到图像每个像素的RGB强度.

I'm using opencv 3.3 with python3.6.3 that I installed in a conda environment and for a while, when displaying images (with the basic cv2 function imshow("window name", my_image) for example) a small GUI would be displayed with the image. I was also able to zoom in and out at will and even go as far as being able to see the RGB intensities of each of the image's pixels.

这很方便,但是最近我用conda( 3.3.0-> 3.3.1 )更新了opencv版本,该功能不见了.降级cv2模块不会恢复该功能.

That was pretty handy, but I recently updated my opencv version with conda (3.3.0 -> 3.3.1) and the feature is gone. Downgrading the cv2 module doesn't bring the feature back.

根据我的发现,我已经发现可以在创建窗口时添加标记 cv2.WINDOW_GUI_EXPANDED 来手动启用此功能,但不会更改显示的窗口上的任何内容

I've gathered, from what I've found, that one can manually enable this feature by adding the flag cv2.WINDOW_GUI_EXPANDED whilst creating the window but it does not change anything on the displayed window.

我设法在cv2中打印了所有可用的标志(在python上使用>> help(cv2)),并且似乎未设置该特定标志:

I managed to print all the available flags in cv2 (with >>help(cv2) on python) and that particular flag doesn't seem to be set :

显然,应该使用Qt构建opencv以获得对该标志的访问权,但是使用conda可以实现吗?

Apparently, one should build opencv with Qt in order to gain access to that flag, but is that possible with conda?

在查看opencv文档时,您会发现它们同时具有 EXPANDED (如下)和 NORMAL (上)GUI

While looking at the opencv Documentation you can see that they feature both EXPANDED (below) and NORMAL (above) GUI

如何设置此标志以使其与当前的opencv版本一起使用?还是我需要在conda上使用Qt构建我的cv2模块?如果可以,怎么办?

How could I set this flag to work with my current opencv version? Or do I need to build my cv2 module with Qt on conda? And if yes, how so?

推荐答案

相比之下,Qt GUI非常棒,只需使用qt构建opencv并将其安装到conda环境中

The Qt GUI is fantastic by comparison, Simply build opencv with qt and install it into the conda enviroment

这篇关于带有python和conda的openCV的扩展GUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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