Skip to content

Instantly share code, notes, and snippets.

@msinnema
Last active June 21, 2018 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msinnema/4958641f562a6d1664d65498488ca2cb to your computer and use it in GitHub Desktop.
Save msinnema/4958641f562a6d1664d65498488ca2cb to your computer and use it in GitHub Desktop.
Synchronized multithreaded Intrada ALPR
using System;
using System.IO;
using System.Linq;
using System.Threading;
using Intrada.ALPR;
namespace RecognizeDirMultiThreaded
{
class Program
{
static void Main(string[] args)
{
try
{
string[] filenames = Directory.GetFiles(".", "*.jpg", SearchOption.AllDirectories);
ThreadedIntradaALPR intrada = new ThreadedIntradaALPR("<COMPANY_NAME>",
"<COMPANY_KEY>", 4, "settings.txt");
Result[] results = intrada.Recognize(filenames);
intrada.Stop();
for (int i = 0; i < filenames.Length; i++)
{
Console.WriteLine( filenames[i] + "\t" + results[i] );
}
}
catch (IntradaException e)
{
Console.WriteLine("Error: " + e);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment