![]() |
|
[C#] C# AForge - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] C# AForge (/showthread.php?tid=4583079) |
C# AForge - Benoit ᵇᵃˡˡˢ - Dec 13, 2014 Hi guys, i need your help I tried finding images on screen using this code snippet: PHP Code and my code is:(which give me an error): PHP Code PHP Code what am i doing wrong? Please bare in mind I am new to C# and spent hours googling * - Only3 - Dec 13, 2014 גיא 🙂 i didnt use AForge but from ur error seems that TemplateMatch is variable and not type (Rectangle) * - Benoit ᵇᵃˡˡˢ - Dec 14, 2014 (Dec 13, 2014 04:23 PM)Only3 Wrote: גיא 🙂 i didnt use AForge but from ur error seems that TemplateMatch is variable and not type (Rectangle) Thank you for your reply , but the code in stack overflow was reported to be working , and the error is referring to the rectangle . תודה * - FSayan93 - Dec 14, 2014 Hey mate, try this: Code foreach(AForge.Imaging.TemplateMatch m in matchings)It should work now :) Greetings! * - Only3 - Dec 14, 2014 use AForge.Imaging.Drawing.Rectangle(data, m.Rectangle, Color.White); and not System.Drawing.Rectangle(data, m.Rectangle, Color.White); Edit - the site lag 😊 as above ... aforge have rectangle method too * - Benoit ᵇᵃˡˡˢ - Dec 15, 2014 (Dec 14, 2014 05:08 AM)FSayan93 Wrote: Hey mate, Thank you both this worked for me! I didn't know that AForge has that too |