Jump to content

1 Screenshot

About This File

🚀 Quick API Overview of ImageSearch UDF for AutoIt

ImageSearchDLL is an ultra-fast image recognition library for AutoIt, leveraging advanced SIMD (AVX512/AVX2/SSE2) optimizations to deliver lightning-fast pixel-perfect and fuzzy image matching.

🌟 Key Capabilities

This library is designed for performance and flexibility, offering:

  •  Ultra-Fast Performance: Achieved through SIMD-accelerated algorithms.

  • 🔍 Fuzzy Matching: Allows tolerance-based color matching (0-255) to handle variations.

  • 🖼️ Multi-Scale Search: Enables searching for images scaled from 0.1x to 5.0x.

  • 💾 Smart Caching: Location and bitmap caching are used for fast repeated searches.

  • 🖥️ Multi-Monitor Support: Fully supports multi-monitor setups.


📚 Core Functions

These are the primary functions for image searching on the screen or within files:

  • _ImageSearch_Startup(): Initializes the ImageSearch library and loads the DLL.

  • _ImageSearch(): Searches for a target image on the screen, optionally within a specific region, with color tolerance, and can return multiple results. It also supports searching on a specific monitor index.

  • _ImageSearch_InImage(): Searches for a target image inside a source image file without performing a screen capture.


🛠️ Advanced & Utility Functions

For deeper control and performance optimization, the library provides several advanced utilities, particularly involving HBITMAP handles:

  • _ImageSearch_CaptureScreen(): Captures a specified screen region and returns an HBITMAP handle.

  • _ImageSearch_hBitmap(): Searches for a target HBITMAP inside a source HBITMAP (bypassing file I/O for speed).

  • _ImageSearch_hBitmapLoad(): Loads an image file into an HBITMAP handle, with optional background color specification.

  • _ImageSearch_Wait(): Waits for a specific image to appear on the screen, with customizable timeout and check intervals.

  • _ImageSearch_ClearCache(): Clears all cached bitmaps and location data.

  • _ImageSearch_GetVersion(): Returns the DLL version string.

  • _ImageSearch_GetSysInfo(): Provides detailed system information, including CPU features and cache status.

  • _ImageSearch_Shutdown(): Cleans up and unloads the library.


⚙️ Debugging and Error Handling

  • $g_bImageSearch_Debug: A global variable that, when set to True, enables debug information in search results.

  • $g_sLastDllReturn: A global variable that holds the debug information string, including timing, backend used, and cache details, from the last search operation.

  • Error Codes: All functions set the @error variable upon failure, with specific negative integer codes ranging from -1 (Invalid path) to -10 (Invalid monitor index) to help diagnose issues.

ImageSearch UDF is OpenSource, free for both personal and commercial use.

Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal

Edited by Trong


What's New in Version v3.1

Released

Source code inside!


User Feedback

You may only provide a review once you have downloaded the file.


tubaba

· Edited by tubaba

  

First of all, thank you for providing a great user experience. However, I do have an issue to bring up. It seems that your DLL automatically corrects parts that exceed the screen, confining them within the frame of 0,0,@DesktopWidth,@DesktopHeight. But there are many application scenarios with multiple screens, which means that screen coordinates should not be limited to the range of the first screen. In earlier versions, I found that the coordinate correction was done in the UDF.444.png.4b2f8d4a6c4c6ee7d970b3d025412f7e.png

Steven2025

  

Thank you for sharing the updated version. I noticed the reference to wrapper functions like _ImageSearch_Wait and _ImageInImageSearch in your post. Could you please clarify:

  1. Are these functions meant to be implemented in AutoIt (AU3) or are they part of a C++ extension?

  2. If they're AutoIt functions, would you be able to share:

    • The required function prototypes

    • Key parameters they should accept

  3. If they're C++ based:

    • Is there a header file or DLL interface we should reference?

Response from the author:

All the functionality is done by c++ dll, AuttoIt is just the user and handler of the results.

 

×
×
  • Create New...