OCR (C#) : IRIS (iDRS 14.0) Part 1 - Getting Started



I was unable to find ANY examples on the internet on how to use the iDRS libraries supplied by IRIS, which probably means that they've got some kind of weird copyright law prohibiting anyone to blog about it, making them the sole means of support on the net (or alternatively its a crap product, which I dont believe it is).

But why would a company willingly shoot itself in the foot? Basically it means that you're not allowed to advertise their product, since showing people how to use it is also a form of advertising.

So these posts will remain active until IRIS asks me to remove it.

Assuming you've downloaded the SDK and bought the product (else click on this link), follow the following steps.

Setting up the licenses



Step 1



Install sentinel Licence Manager located under redist/software_protection folder; used to validate licences against their servers.

Sentinel RMS License Manager

Step 2



Retrieve computer specific id by running the idrs_sentinel_computer_id.exe located in your bin folder.

Step 3



Retrieve your generated keys by passing the serial numbers IRIS supplied you in combination with the computer id generated in step 2 via the the idrs_sentinel_software_key command like seen below:

 
idrs_sentinel_software_key.exe 0000000000000000000000000000000000 iDRS14_STD2_Desktop 1 IDRS14_STD2_DRS *RetrievedComputerId
 

Which will return you some funky code which you need to use in your license class, you will need to repeat this step for every module you've got licenses for.

Adding references



I found it a bit cumbersome adding the needed references to my solution, since basically your executable needs to reside in the same folder as the assemblies making out the OCR engine. (the millions of assemblies you'll find under the bin folder of the SDK)

The way they did it in their sample files is to simply compile the application to the bin folder of the SDK, not very portable don't you think?

So what I did instead was to create a folder in my solution named Assemblies and copied all the needed assemblies to that folder and set a prebuild script to copy the assemblies to my application folder like seen in the following image.

Set pre-build event command line

Right click solution >
Select Properties >
Click on Build Events Tab >
Edit Pre-build Command Line with the following text.
Copy $(ProjectDir)Assemblies\*.* $(TargetDir)

As for the .net assembly (idrskrn_net14.dll bit of a poorly named assembly according to .net standards), you simply add like you'd add any other .net assembly.

Chances are good that you'll get the following BadImageFormatException (bad image format, bad boy, down boy) as soon as you attempt to run your application.

BadImageFormatException

You'll need to set your executable platform target to x86 like seen in the following image.

Cpu Type

Right click solution >
Select Properties >
Click on Build Tab >
Select x86 on Platform target dropdown

In the next part of this post we're going to have a look at how to retrieve text from an image using the iDRS SDK.







Comments



Must agree with you it is pretty bad...


IRIS !

IRIS sdk is the worst sdk i have ever seen in my life !!!


Post comment

Name *
Email
Title
Body *
Security Code
*
* Required fields

Related Posts

Latest Posts

Be the best stalker you can be


2011-12-13 22:33:54

Syntactic sugar (C#): Enum


2011-08-04 16:50:18

Top 5 posts

Simple WYSIWYG Editor


Creating a WYSIWYG textbox for your website is actually quite simple.
2007-02-01 12:00:00

Moving items between listboxes in ASP.net/PHP example


Move items between two listboxes in ASP.net(C#, VB.NET) and PHP
2008-06-12 17:07:43

C# YouTube : Google API


Post on how to integrate with YouTube using the Google Data API
2011-03-12 08:37:51

Populate a TreeView Control C#


Populate a TreeView control in a windows application.
2009-08-27 16:01:03

Cross Browser Issues: Firefox Word Wrapping


Firefox word wrapping issues
2008-06-09 09:51:21