使用`cv2.imshow()`````Cv2''

发布于 2025-01-29 02:46:49 字数 427 浏览 2 评论 0原文

有没有办法获取有关Python CV2中缩放部分的信息?

在Python中使用OpenCV时(导入CV2) 然后使用cv2.imshow('windowname',imgnparray) 然后,当我悬停在图像上并使用滚动轮时,我可以放大图像中,在Python中,我可以以某种方式获得有关缩放区域的信息吗?

在我的示例中,变焦大约要缩放大约3次,左侧0.5偏移率和0.25偏移率top

“

is there a way to get information about the zoomed section in python cv2 ?

when using opencv in python (import cv2)
then using cv2.imshow('windowname', imgnparray)
then when i hover over the image and use the scroll wheel i can zoom into the image, in python can i somehow get information about the zoomed area?

in my example the zoom would be around 3 times zoomed in and 0.5 offset left and 0.25 offset top

zoomed_section

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

与之呼应 2025-02-05 02:46:49

目前不可能。

要获取此信息,您需要修改OpenCV的源代码。您可以就此功能打开问题。

相关值可以在文件positecorners中找到模块/highgui/src/window_qt.cpp 中的。

That's currently not possible.

To get this information, you would need to modify OpenCV's source code. You could open an issue about this, requesting the feature.

The relevant values can be found in the variable positionCorners in the file modules/highgui/src/window_QT.cpp.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文