Async scanning

Setup
To get the best result of my barcode scanning, I have diverse strategies that do the scanning async. Eg. One to break the images up into smaller pieces and give the scanner a bigger piece of the image, etc. And I run these in diverse Tasks. After the first one give me a result, I want to cancel the rest. All of this is also done within an API running on IIS.

Questions

  1. Is it possible to cancel the scanning?
  2. Are there any information we need to be aware of running in an IIS environment?

@wtoerien,

We have logged an investigation ticket for it as follows. You will be notified once any update is ready for sharing.
BARCODENET-37860 - Option to interrupt barcode scanning

There are no specific guidelines for the IIS environment. You may please use it and if face some issue, please write us back.

At this time BarCodeReader has two methods to abort image recognition:

  • method Abort() – which can be called from other thread;

  • Timeout property – where you can set timeout value in milliseconds. If the engine cannot recognize in timeout time it aborts recognition.

All of methods clean and don’t cause any resources leaks. However, BarCodeReader uses soft real-time and on large images (~30 MPix) differences between timeout time and real execution time can be even 100 milliseconds.

In the addition, you can set recognition regions on the image. In this case the recognition will be run only on this part of image.