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

August 4, 2011 by C#  

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 don't 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.  

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.


Leave a Comment


error setup sentinel. October 20, 2012 by Anonymous

thanks your post, it's really help me, but have a problem when i set up sentinel, i can't intall it, my system notifice "The wizad was interrupted before Sentinel RMS Liscense Manager could be completed install. Your system has not been modified," what is problem? help me thanks!

November 17, 2011 by Christoff Truter

Must agree with you it is pretty bad...

IRIS ! November 17, 2011 by Anonymous

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