简体   繁体   English

x11vnc 边界框坐标

[英]x11vnc bounding box coordinates

I have a question regarding screen regions or possibly mouse/cursor coordinates in x11vnc.我对 x11vnc 中的屏幕区域或鼠标/光标坐标有疑问。

I am trying to create all possible mouse positions using an image within an image.我正在尝试使用图像中的图像创建所有可能的鼠标位置。 The primary image will always be 765 by 503 pixels.主图像始终为 765 x 503 像素。 The secondary image is unknown until I figure out how to extract the secondary region in a easily-reproducible manner.在我弄清楚如何以易于重现的方式提取次要区域之前,次要图像是未知的。 Meaning, I will need some way of somewhat some-what accurately grab the secondary image that I want, and then be able to extract the x,y of the secondary image in respect of the primary image.意思是,我需要某种方式来准确地抓取我想要的次要图像,然后能够提取次要图像相对于主图像的 x、y 值。 Meaning that the bottom-left corner of the secondary image coordinates of x,y will not be 0,0 but rather the x,y values as if it were the main image.这意味着 x,y 的次图像坐标的左下角将不是 0,0,而是 x,y 值,就好像它是主图像一样。 This is only meant to help create accurate coordinates, actual results may differ.这只是为了帮助创建准确的坐标,实际结果可能会有所不同。

I know the image will be there because I am using vncdotool to expect the image, and then perform an operation once the image is found.我知道图像会在那里,因为我使用 vncdotool 来expect图像,然后在找到图像后执行操作。 Note: I am not sure what what rexpect within the vncdotool does注意:我不确定rexpect中的 rexpect 做了什么

Using x11vnc I have shared a single application, so all coordinates are needed, I just need to figure out a way to map image(s) to coordinates upon the vncdotool expect finding the secondary image使用 x11vnc 我共享了一个应用程序,因此需要所有坐标,我只需要找出 map 图像的方法,以便在 vncdotool 上进行坐标,期望找到辅助图像

This github repo solves this question这个 github repo 解决了这个问题

You can create an XML file using a simple gui on the image to draw the rectangle you wish to create the bounding box on and get the x_min, y_min, x_max, y_max pixel coordinates which can translate into mouse/cursor coordinates.您可以使用图像上的简单 gui 来创建 XML 文件,以绘制您希望在其上创建边界框的矩形,并获取可以转换为鼠标/光标坐标的 x_min、y_min、x_max、y_max 像素坐标。

https://github.com/tzutalin/labelImg https://github.com/tzutalin/labelImg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM