Search code examples
c#opencvcomputer-visionzxingemgucv

Multiple QRCode detection from video stream


I am making a program in c# that must detect and scan Qr-codes from a tag (using security cameras) that people glue to their chest, and as a second layer of security must also capture their faces and match them in a database. Now, i was able of dealing with the face recognition just fine, but the program fails to read more than one Qr-code at a time. How could i deal with this? I am using ZXing's library aswell as Emgu.cv. Are there better options? My code for QR-Reading is:

        bitmap = frame.Bitmap;
        txtQreader.Text = Qrreader(bitmap); //it's inside an if, not that it matters :p


    private string Qrreader(Bitmap x)
{
    BarcodeReader reader = new BarcodeReader { AutoRotate = true, TryHarder = true };
    Result result = reader.Decode(x);
    string decoded = result.ToString().Trim();
    return decoded;
}

Solution

  • Well the problem is solved after consulting another website it was told to me that using IMultiBarcodereader will return an array with all the decoded information contained in multiple codes. Also reader.Decode(x) must be made into reader.Decodemultiple(x).