GNOME Bugzilla – Bug 600461
[zbar] Over-eager detection of barcodes
Last modified: 2009-11-03 22:23:29 UTC
Trying to scan a barcode on a webcam, using: gst-launch -m v4l2src ! tee name=t ! queue ! ffmpegcolorspace ! zbar ! fakesink t. ! queue ! xvimagesink The webcam resolution is 1600x1200. The results don't match each other. The barcode is an EAN-13 one. Got message #95 from element "zbar0" (element): barcode, timestamp=(guint64)9494316570, type=(string)EAN-13, symbol=(string)0063206000083; Got message #101 from element "zbar0" (element): barcode, timestamp=(guint64)11140332949, type=(string)EAN-13, symbol=(string)0021210000079; Got message #104 from element "zbar0" (element): barcode, timestamp=(guint64)11799216188, type=(string)EAN-13, symbol=(string)0072800000436; Got message #107 from element "zbar0" (element): barcode, timestamp=(guint64)12179130021, type=(string)EAN-13, symbol=(string)0000530000037; Got message #109 from element "zbar0" (element): barcode, timestamp=(guint64)12810222023, type=(string)EAN-13, symbol=(string)4398373286166; Got message #117 from element "zbar0" (element): barcode, timestamp=(guint64)16320221191, type=(string)EAN-13, symbol=(string)0063260000029; Got message #122 from element "zbar0" (element): barcode, timestamp=(guint64)17587264333, type=(string)EAN-13, symbol=(string)0076957000073; Got message #123 from element "zbar0" (element): barcode, timestamp=(guint64)17587264333, type=(string)EAN-13, symbol=(string)0055807000098; Got message #125 from element "zbar0" (element): barcode, timestamp=(guint64)17600386866, type=(string)EAN-8, symbol=(string)16613171;
FWIW, zbarcam completely fails to detect a barcode as I don't manage to get proper focus on it, which is probably what the zbar GStreamer plugin should try and do.
I'll talk to the zbar devels tonight to see how we can improve that. But ideally this bug should go against zbar, as I just wrap libzbar in the plugin. I've already askes to get a certainity along with the results.
Well, I mention this only because zbarcam which should be using the same API doesn't have that problem of being overly enthusiastic in giving me answers.
commit 94942cf69b4da79f3f15d8d0c9e5da3ab7bbcfa1 Author: Stefan Kost <ensonic@users.sf.net> Date: Wed Nov 4 00:19:20 2009 +0200 zbar: include quality and check count, fixes #600461 We report the relative quality in the message and we also use the cache to skip early detects and doubles.