Thread: mbarcode
View Single Post
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#112
I'm finding it very hard to hold the camera steady once I've got a good, in-focus picture of the barcode.

If I take a picture of the barcode, a message can pop up saying, "attempting to decode" and "no valid barcode found" or the barcode value can just be displayed.

The way things are currently, it is very unclear what's going on. I'm pointing at a barcode, it is in focus, but nothing's happening! My hand is getting cramped! The focus just slipped out again! Argh!
Yeah, perhaps I should add some instructions.

Basically the following is happening. When you press the Scan! button, the camera is autofocused (you can also make this happen while scanning by pressing the image window itself) and then the video data (running at only ~10fps, hence the slow screen updates, partly) is passed to the decoders.

The ZBar decoder is run on each frame as it runs quickly, therefore if you have a 1D or a QR code (especially QR as it handles out of focus better than 1D atm) it will probably be decoded almost immediately. The libdmtx decoder is run in a thread and is only allowed to run twice per second as it's rather slow (and the cause of the stutters in the output video).

Therefore, as scanning is quite quick, but out-of-focus is more of a problem, there's not that much point in giving a "now decoding" message. Really it needs work doing on the 1D and Datamatrix decoders to accept more out of focus images (which I should add I'm going to start once I've got the base code moved to Qt, so we can have Python plugins).