Converting AHK imagesearch code to C++ for AHK_L use
Posted 03 August 2012 - 11:28 PM
I was recently working on Tics Gdip_ImageSearch function trying to make it faster (because I love doing that kind of thing) and I found that the built in AHK imagesearch code is super slow at imagesearch with variation. I found faster methods and wrote them in AHK and C compiled to work through the MCode function inside AHK.
The code I wrote based on Tics code is volumes faster at imagesearch with variation compared to the built in AHK one (100 MS vs 40 seconds) and I was wondering if anyone decent at C++ would be interested in converting the C/AHK code I have into C++ for use in AHK_L.
The majority of the Gdip_Imagesearch code I wrote is already very basic C so it shouldn't be hard to convert into C++.
The code can be found here: http://www.autohotke...pic.php?t=76261
Just follow the first post I made onward for a description of the changes I made - the last post I made contains the most recent version and optimizations I made to the code.
I tried doing the conversion myself but I'm no good at C++ and it would take me more time then I have. If someone is willing to do the conversion I can work with them to explain what the code does and so on. That person can also take the main credit for the code if they wanted to. All I ask for is something like "Based off Tics/Rseding91's Gdip_Imagesearch code". Please don't take this as "i'm to lazy so you do the work" - i'll try this myself eventually but i'm just to busy with work and school at the moment.
Posted 21 August 2012 - 01:27 PM
Looking at the current source, a refactoring would be nice anyway. Spliting up the whole pixel/image search into multiple methods, this would it make more easy to support more than one algorithm.
Posted 21 August 2012 - 08:52 PM
I am working on cleaning up the imagesearch function code (the parts I added and the old code) and then i'll post it here and PM it to Lexikos to see if he finds it acceptable.
Posted 22 August 2012 - 07:46 AM
Posted 24 August 2012 - 02:47 AM
Select one of the
I'm not sure how to generate the ANSI builds in visual studio but I have no reason to think the code would fail.
(mbcs)build configurations. I added a readme to github recently - it describes the various build configurations.