InoTec M03 Activate PatchCode ExtendedImageInfos

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Moderator: Alex

Post Reply
MartinIbanez
Posts: 2
Joined: Wed Dec 01, 2010 7:41 pm

InoTec M03 Activate PatchCode ExtendedImageInfos

Post by MartinIbanez » Wed Dec 01, 2010 7:56 pm

Hello,

I am trying to receive the PatchCode that has been detected, but the extended image infos are always empty.
EndOfJob Detection is working fine but I can't get any extended infos.

This is how I configure the scanner.

//init Scanner
this.Scanner.ExtendedImageInfo.Add(new ExtendedImageInfo(ExtendedImageInfoId.PatchCode));
this.Scanner.ExtendedImageInfo.Add(new ExtendedImageInfo(ExtendedImageInfoId.BarcodeCount));
this.Scanner.ExtendedImageInfo.Add(new ExtendedImageInfo(ExtendedImageInfoId.BarcodeType));
this.Scanner.ExtendedImageInfo.Add(new ExtendedImageInfo(ExtendedImageInfoId.BarcodeTextLength));
this.Scanner.ExtendedImageInfo.Add(new ExtendedImageInfo(ExtendedImageInfoId.BarcodeText));
//patch code seperator
Scanner.JobControl = JobControl.DetectAndIncludeJobSeparatorAndContinueScanning;

This is how I try to receive the extended image infos in the ImageAcquiredEventHandler.

if (Scanner.EndOfJob) //This works
{
var patchcodes = Scanner.ExtendedImageInfo[0]; //Scanner.ExtendedImageInfo.Count is also working, but all collections are empty
if (patchcodes != null && patchcodes.Items != null && patchcodes.Items.Length > 0)
{
string patchcode = patchcodes.Items[CurrentImage].ToString();
switch (patchcode)
{
case "1":
//todo: load settings/profile for patch code 1
break;
case "2":
//todo: load settings/profile for patch code 2
break;
}
}
}

The extended image info collection hat 5 collections, but these collections are allways empty.

My question is do I have to make something different? Do I have to set Capability[36] (IPatchCodeDetectionEnabled;4415) to true? And how could I do that?

Another Questions is about e.Image.IsBlank(noiseLevel). How does this work? Which noise level do I have to set? Where can I see the noise level of the current image?

Thanks for your help.

Martin

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: InoTec M03 Activate PatchCode ExtendedImageInfos

Post by Alex » Fri Dec 03, 2010 4:51 pm

Hello Martin,

First, you need to check that scanner can detect patch codes, i.e. the IPatchCodeDetectionEnabled capability is supported.

Next, you need to enable detection of patch code, i.e. set value of the IPatchCodeDetectionEnabled capability to true (1).

Next, you need to specify that you want to receive information about found patch codes: this.Scanner.ExtendedImageInfo.Add(new ExtendedImageInfo(ExtendedImageInfoId.PatchCode)).

Finally, you need to analyze extended information received from the scanner.

Best regards, Alexander

MartinIbanez
Posts: 2
Joined: Wed Dec 01, 2010 7:41 pm

Re: InoTec M03 Activate PatchCode ExtendedImageInfos

Post by MartinIbanez » Fri Dec 03, 2010 9:06 pm

Hi Alex,

thank you. Your tips brought me to the relevant section in the documentation and solved the problem.

Martin

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest