maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   mbarcode (https://talk.maemo.org/showthread.php?t=34996)

TiagoTiago 2010-08-25 23:23

Re: mbarcode
 
here's the output: http://pastebin.com/5bFbSBDz

lardman 2010-08-25 23:29

Re: mbarcode
 
Well it looks like the isbn plugin is probably installed, which would handle the requirement of the meta-plugin to have at least one plugin installed. You may need to go to the App Manager and install the rest of the plugins manually.

I'd not thought of this case (someone has only one plugin installed before an upgrade, which will meet the meta-plugin package requirement), but they may want all of the new plugins installed when mBarcode is updated.

TiagoTiago 2010-08-25 23:40

Re: mbarcode
 
I'll try uninstalling everything and resintaling each plugin one by one (instead of that all plugins pack)


btw, how about using the resolution doubler from BlessN900? Does it perform well with artificial patterns like barcodes?

noursy 2010-08-26 05:50

Re: mbarcode
 
Quote:

Originally Posted by wmarone (Post 798475)
Most QRCode readers that I recall seeing in Japan require the user line it up then click a button, allowing processing from a higher resolution image. I don't know how the Android readers do it, I suspect it may be similar (haven't used any to find out.)

IIRC, Android detects the control points of the QR code (it surrounds them with a green square) and then scans the code (and probably takes a hi-res picture in between).

Quote:

Originally Posted by wmarone (Post 798475)
One way to work around this issue could be having it watch for the control points enter the box and change the color of the line (or mark the points) and intercepting the shutter button.

If control-point detection can be made, there is no need for the user to press anything: once all three points are on the "viewfinder" picture, a hi-res picture can be taken automatically.

noursy 2010-08-26 06:02

Re: mbarcode
 
Quote:

Originally Posted by lardman (Post 798488)
Well it looks like the isbn plugin is probably installed, which would handle the requirement of the meta-plugin to have at least one plugin installed. You may need to go to the App Manager and install the rest of the plugins manually.

Btw, the ISBN plugin seems not to work. When I scan a barcode on a book, there is no sign of the ISBN plugin (webrequest however works).

It appears to be loading, according to the logs it gets the decoded barcode text, but after that no button appears in the "Results from scan" window.

lardman 2010-08-26 09:00

Re: mbarcode
 
Quote:

Originally Posted by noursy (Post 798663)
Btw, the ISBN plugin seems not to work. When I scan a barcode on a book, there is no sign of the ISBN plugin (webrequest however works).

It appears to be loading, according to the logs it gets the decoded barcode text, but after that no button appears in the "Results from scan" window.

It may be that the ISBN plugin is broken, I think that's joshn53's baby so we'll have to ask him. In any case I'll have a look at it when I have a spare minute.

lardman 2010-08-26 09:01

Re: mbarcode
 
Quote:

Originally Posted by TiagoTiago (Post 798500)
btw, how about using the resolution doubler from BlessN900? Does it perform well with artificial patterns like barcodes?

Not tried it, but equally it's not necessary as we still have extra resolution available without turning to software methods (which I guess BlessN900 uses.)

lardman 2010-08-26 09:04

Re: mbarcode
 
Quote:

Originally Posted by noursy (Post 798653)
IIRC, Android detects the control points of the QR code (it surrounds them with a green square) and then scans the code (and probably takes a hi-res picture in between).

The problem is that we're not only scanning for QR codes, which have the identifiers, but also 1D codes and Datamatrix. Therefore, although we could theoretically perform some integration of the QR code decoder with the pipeline to alter res on the fly, we'll still have troubles with at least the Datamatrix stuff.

Re drawing green squares, I was talking to the lead author of libzbar and asking if the location info could be returned so I could add e.g. a green overlay to show where the barcode has been detected. I got busy with other stuff but certainly it should be doable (only a cosmetic enhancement, but might be nice.)

noursy 2010-08-26 09:36

Re: mbarcode
 
I actually asked my colleague to scan the giant QR code mentioned above, with his Android phone. The device makes many attempts at locating the control points (it shows them in yellow while detecting them, and then in green when it has found a consistent sent of points), and quite often will detect a 1D barcode among the cloud of points that makes the QR code. Also, it works only if the QR code is reasonnably well aligned with the pixel grid of the camera.

Does mbarcode rely entierly on libzbar to detect the presence of a barcode? I wonder if zbar could detect the presence of a barcode even with a picture which is too small for proper decoding? If this is the case, it would be possible to search for a code in low-res before taking a hi-res picture for decoding.

lardman 2010-08-26 13:53

Re: mbarcode
 
mBarcode uses libzbar and libdmtx to perform 1D/QR and Datamatrix decoding respectively.

Afair, both libraries simply have a scan() type function which you call and it returns a decoded barcode (or barcodes) if it's (they're) found. I imagine it would be quite possible to perform initial scanning on a low-res image to detect the QR code location blocks, but it would need either a change to the scan() type function so that it subsamples and performs a quick look first, or another api function to allow us to send in a low res image.

Again though, it's not going to help for 1D and Datamatrix codes, which we also want to decode. Therefore, although this would probably speed up QR decoding (quick decision vs subsampling overhead) and let us know if we need to try stepping up the res, we still won't have this info available for the 1D and Datamatrix.

I'd prefer something that will work for all the barcodes we might encounter without adding complexity for any individual one, so let me see how I get on with making the code move to higher res images if nothing is decoded and see whether that is sufficient, and if not we can have a think about other methods.


All times are GMT. The time now is 02:34.

vBulletin® Version 3.8.8