^ What's the point?
^ Requirements
^ Compare (search) modes
^ Pre-process the images
^ Loading a picture from HBitmap
^ Free Image Library
^ Copyright, Disclaimer, and all that other jazz

Download :: Topics on this subject on the Forum :: Top
Image Recognition Library

Image Recognition Library is a component for use in Win32 and Win64 (2K/XP/Vista/7/8/10) software with a purpose to provide image recognition functionality, that is compare two pictures if they are the same or similar or find a smaller picture in a bigger picture with difference tolerance.

Features:
  • Exact, relative ARGB and AHSL search modes with alpha channel support
  • Pre-process images with 6 different resamplers
  • Multi-threaded processing
  • Multiple match support
  • Full unicode support
  • Platforms: x86 and x64
  • Delphi and C++ API included
You should also see the included example programs's source-codes for example of how to use Image Recognition Library in your own programs.

Requirements
  • Delphi 2009 or a developer environment that supports the stdcall calling convention.
  • The search bitmaps must be 32 bit.


Image Recognition Library in shareware and commercial software?

The component is free for free software. If like it and use it for shareware and commercial software you need one of the licenses.


Compare (search) modes
  • IR_COMPARE_TYPE_EXACT: Perform an exact search with an allowed pixel difference count. This requires that the search for bitmap is pixel identical with the search in bitmap, although you can set a "DifferenceTolerance" value to allow a concrete pixel count to differ. Exact mode is the fastest of the available modes.

  • IR_COMPARE_TYPE_RELATIVE_ARGB: Perform a search with an allowed pixel difference in Alpha-Red-Green-Blue color space. This mode is usefull when searching a similar picture in another picture. Setting a "DifferenceTolerance" value will allow a concrete pixel count to differ completly. This mode is slower than exact mode but faster than AHSL mode.

  • IR_COMPARE_TYPE_RELATIVE_AHSL: Perform a search with an allowed pixel difference in Alpha-Hue-Saturation-Lightness color space. AHSL component values range from 0 to 1. This mode is usefull when searching a similar picture in another picture but AHSL mode is required. Setting a "DifferenceTolerance" value will allow a concrete pixel count to differ completly.

  • IR_COMPARE_TYPE_RELATIVE_ARGB_ALPHA: Same as ARGB but the search for bitmap's pixels transparency value (alpha chanel) is considered when searching. Usefull when searching for a non-rectangular image, for example to find a logo put on a picture with transparency. Recommended that the search for bitmap is a PNG image with transparency. Slower then ARGB mode.

  • IR_COMPARE_TYPE_RELATIVE_AHSL_ALPHA: Same as AHSL but the search for bitmap's pixels transparency value (alpha chanel) is considered when searching. Usefull when searching for a non-rectangular image, for example to find a logo put on a picture with transparency but AHSL mode is required. Recommended that the search for bitmap is a PNG image with transparency. This is the slowest of the available modes.


Pre-process the images

It can be usefull to resize the images when loading for faster processing and also usefull if you want to compare two images that differ in dimensions. When acquireing the picture object specify the "ProcessType" parameter of the "TIRCreateObjectParameters" structure to "IR_PROCESS_TYPE_RESAMPLE". And specify a resampler ("Resampler" variable).


Loading a picture from HBitmap

Use the "TIRObject"'s "FileName" variable and give it a HBitmap value. Type-cast the HBitmap value to PWideChar.
Then use:
ImageRecognition_CreateObjectFromBitmapHandle
to load it.

For example:

var
    Bitmap: TBitmap;
begin
    FreeImageLoadImage(Edit1.Text, Bitmap, Handle);
    IRObjectSearchIn.FileName := PWideChar(Bitmap.Handle);
    ImageRecognition_CreateObjectFromHandle(IRObjectSearchIn, IRCreateObjectParameters);
end;


Free Image Library

Free Image Library is a free solution for loading and saving of many different image formats. Free Image Library adds support for many picture formats automatically and the pre-processing (resampling) option. FreeImage.dll is required for Image Recognition Library to function properly.

http://freeimage.sourceforge.net/


Copyright, Disclaimer, and all that other jazz

Image Recognition Library is free for free software. If like it and use it in shareware or commercial software you have to buy a license.
This software is provided "as is", without warranty of ANY KIND, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The author shall NOT be held liable for ANY damage to you, your computer, or to anyone or anything else, that may result from its use, or misuse. Basically, you use it at YOUR OWN RISK.
Usage of Image Recognition Library indicates that you agree to the above conditions.
You may freely distribute the Image Recognition Library package as long as NO FEE is charged and all the files remain INTACT AND UNMODIFIED.
All trademarks and other registered names contained in the Image Recognition Library package are the property of their respective owners.


Bug reports, Suggestions, Comments, Enquiries, etc...

If you have any of the aforementioned please email: 3delite@3delite.hu


[Top]