如何在 C# 中搜索屏幕上的图像?
我想使用 C# 或其他 .NET 语言(如 powershell)在屏幕上搜索图像。就像我在文件系统中给出图像位置,代码将整个屏幕视为图像并在大图像(屏幕)中搜索文件系统中的图像,然后返回屏幕上的图像位置。我在 .net 类中找不到此类内容。
谢谢。
I want to search for an image on screen using C# or other .NET languages(like powershell). Something like i give an image location in the file system and the code consider the whole screen as an image and search the image in the file system in the big image(the screen) then returns the image position on screen. I can't find this kind of things in the .net classes.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个非常具体的问题,这就是为什么您在 .NET Framework 中找不到它。您应该将问题分解为更小的部分:
从磁盘上的文件加载图像
使用System.Drawing.Image.FromFile()。
获取屏幕图像,即屏幕截图
使用System.Drawing.Graphics.CopyFromScreen():
在图像中查找图像
查看这个问题。
This is a pretty specific problem, which is why you won't find it in the .NET Framework. You should break down your problem in smaller pieces:
Load image from file on disk
Use System.Drawing.Image.FromFile().
Acquire an image of the screen, i.e. a screen shot
Use System.Drawing.Graphics.CopyFromScreen():
Find image inside image
See answer to this question.
我制作了一个程序,该程序使用我在 C# 中编码的库,它将返回较大图像(屏幕截图)内的小图像的 x 和 y 值,您可以在此处查看所有详细信息 https://www.nulled.io/topic/22223-an-advanced-image-search-库-saeedsearchdll/
i have made a program which used a lib i coded in c# which will return the value of x and y of a small image inside a bigger image (screenshot) you can see all the details here https://www.nulled.io/topic/22223-an-advanced-image-search-library-saeedsearchdll/