c# - decode multiple qr code webcam based QR decoder -


i learning on qr code decoder. previously, took example "https://zxingnet.svn.codeplex.com/svn/trunk/clients/emgucvdemo/" , and rebuild it. added additional function it. working fine shown below

enter image description here

however realize decoder cannot decode if there more 1 qr code in image during webcam video capture

enter image description here

i looked @ "http://zxing.org/w/docs/javadoc/com/google/zxing/multi/multiplebarcodereader.html" , use method stated still cant detect qr code if there more 1 in image. appreciate if gv heads or tutorial on matter. thank you

you should change following code within emgucvdemo

           // decode            var result = reader.decode(image);            // show result            if (result != null)            {               ...            } 

to

           // decode            var results = reader.decodemultiple(image);            // show results            if (results != null)            {               // it's array of results               ...            } 

the initialization of reader instance should changed from

reader = new barcodereaderimage(); 

to

reader = new barcodereaderimage() { possibleformats = new list<barcodeformat> { barcodeformat.qr_code } }; 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -