English 中文(简体)
筛查区承认Find 现场检查
原标题:Screen Region Recognition to Find Field location on Screen

我试图想出一种办法,使Sikuli在C#中的形象得到承认。 我不想使用Sikuli语,因为其描述性语言太慢,而且因为我确实不想在我的“NET C#”中架设一座java桥。

因此,我有一份标尺图,代表我的屏幕(我称该地区为BUTTON1)。 屏幕布局可能稍有变化,或屏幕可能在桌面上移动,因此我可以直接使用。 我必须首先发现,BUTTON1的目前职位在现场。 (我试图播下这方面的照片,但我猜测我是新用户......) 我希望,描述清楚了......。

I think that Sikuli is using OpenCV under the covers. Since it is open source, I guess I could reverse engineer it, and figure out how to do what they are doing in OpenCV, implementing it in Emgu.CV instead -- but my Java isn t very strong.

我列举了这方面的例子,但所有例子都非常简单(例如,如何识别标志)或非常复杂(例如,如何做表面上的承认)。

我也担心,所有各种图像操纵的例行工作实际上都很紧张,我真的希望尽可能轻重(实际上,我可能有许多县和田地试图在屏幕上找到......)

因此,我想这样做的方式是:

A) 将比图转换成细列阵列,并对部队进行搜索。 (我知道如何做到这一点)。 之后

B) 利用我发现用来计算其屏幕位置的星阵列位置(我实际上并不完全确定我如何这样做),而不是使用图像处理。

Is that completely crazy? Does anyone have a simple example of how one could use Aforge.Net or Emgu.CV to do this? (Or how to flesh out step B above...?)

感谢!

最佳回答

一般来说,它同你一样,希望得到基本目标承认。 我在SIKULI方面没有任何经验,但有一些方式来进行反对承认(基于Edge的模板配对等)。 可以说,你可能只能够直截了当地打上他的图象。

http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx

该网页应显示你如何利用AForge.net获取图像图。 你们只想用像这样的东西进行残酷的武力搜查:

Bitmap ImageSearchingWithin=new Bitmap("Location of image"); //or just load from a screenshot or whatever
for (int x = 0; x < ImageSearchingWithin.Width - WidthOfImageSearchingFor; ++x)
{
    for (int y = 0; y < ImageSearchingWithin.Height - HeightOfImageSearchingFor; ++y)
    {
        Bitmap MySmallViewOfImage = ImageSearchingWithin.Clone(new Rectangle(x, y, WidthOfImageSearchingFor, HeightOfImageSearchingFor), System.Drawing.Imaging.PixelFormat.Format24bppRgb);
    }
}

然后,将新制作的图形与你计算出的原始图像(无论哪一个地区是相配最接近的地区,是你选择的SBUTTON地区)。 它不是最棘手的解决办法,而是可以满足你们的需要。 否则,你就掌握了更困难的技术(当然,在可能比较简单的时候,我会忘记一些。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签