Active Topics

 



Notices


Reply
Thread Tools
amorek13's Avatar
Posts: 245 | Thanked: 32 times | Joined on Oct 2009 @ CT USA
#1
want to say great job so far to lardman on mbarcode, works great in landscape and portrait mode,
so far it scans barcodes nicely and then i guess it trys to look it up but it just sits there, work in progres per lardman looks nice tho.

Last edited by amorek13; 2009-11-24 at 16:36.
 

The Following 5 Users Say Thank You to amorek13 For This Useful Post:
Andre Klapper's Avatar
Posts: 1,665 | Thanked: 1,649 times | Joined on Jun 2008 @ Praha, Czech Republic
#2
For future reference, punctuation is welcome.
__________________
maemo.org Bugmaster
 

The Following 3 Users Say Thank You to Andre Klapper For This Useful Post:
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#3
Ok, so I've done some more work on mbarcode recently. The code is in Garage project maemo-barcode if anyone's interested.

The Fremantle version in Extras-devel is a couple of iterations further on than the Diablo version (also in Extras-devel), but that's just because I've not got round to changing my sb target to check that it builds. Will do that this evening.

So current feature set:
  • Autofocus (N900) - automatically focuses when you click "Scan", also if you tap the video image while it's running.
  • Rotation support (N900)
  • Decodes 1D and QR codes using zbar (thanks tteribe/derf for adding QR support) and Datamatrix codes using libdmtx.
  • Displays the decoded data (in an edit box so you can copy it if needed) and tries to open an application to handle the data. This is mainly important for 2D barcodes which might contain vCards, telephone numbers, URLs, email addresses, etc.
  • For 1D codes, I have a very rough and ready Amazon webscraper in place, but really I could do with more data sources (there are some commented out in the code in web.c) and better parsing of the HTML data (not my area of expertise).

What I would really like is to use Amazon Web Services (AWS), but again I'm not an expert and the example source I've seen is all !C code. Any help gratefully appreciated.

So sometimes the app will tell you it's looking up a barcode, but nothing will happen - either due to no weblink, or the parser failing.

Things to improve/add:
  • Lots of compiler warnings, should clean the code up and get rid of these.
  • AWS support.
  • The code has a partially working database system (in which one can save and search for barcodes for e.g. your CD collection, etc.), but I've commented it out for the time being as it's not fully working. Get this working!
  • For a given product produce page which shows detailed information and reviews and prices at various retailers (AWS would help greatly with these items)
  • Add support for further 2D barcode payloads - please suggest any you think it doesn't handle, code appreciated too
  • Add support for installing an application from a 2D barcode - I've got some commented out code in there atm which will allow you to encode the contents of an .install file in e.g. a QR code (QR code decoding is much faster than datamatrix, so is preferable) and after decoding pass this onto the app manager.
  • improve performance of libdmtx, or preferably move the functionality to zbar (to avoid multiple image processing steps).
 

The Following 49 Users Say Thank You to lardman For This Useful Post:
Posts: 108 | Thanked: 180 times | Joined on Sep 2009
#4
This is better than Symbian barcode reader. I found it useful also as a torch.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#5
I should add that I'm thinking of issuing a DBUS message whenever a barcode is decoded so that people can also use the information in their own apps. Would this be of interest?
 

The Following 12 Users Say Thank You to lardman For This Useful Post:
Posts: 108 | Thanked: 180 times | Joined on Sep 2009
#6
It is good idea. I can see several possibilities to use that information.
 
pH5's Avatar
Posts: 138 | Thanked: 375 times | Joined on Aug 2009 @ Berlin
#7
Very much so. Actually, a clean way to handle the following workflow would be welcome:

1. Application starts mbarcode with a simlple UI,
2. user scans a barcode,
3. mbarcode reports back (optionally with decoded results from Amazon or similar lookup) and closes itself,
4. application uses barcode contents or decoded results.
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#8
To continue the theme, there are two useful options to allow other apps to use the barcode data (and avoid them having to implement their own camera control and decoder stuff):

DBUS messages which apps can listen for, after having opened mbarcode somehow.

or

Allow plugins in mbarcode, so that a given app can be displayed in the main mbarcode window.


The first is certainly easy enough to do, and would probably be the preference for apps which do something other than handle the barcode data, but if we're talking about a shopping list app, or something of this type, where the scanning is a big part of the usage of the app, I don't know whether the continual switching would be annoying. I also worry about foreground/background issues, especially if the phone goes off part way through - then the user would have to work out what the outside app is trying to do and switch to mbarcode to capture an image.

Perhaps these aren't big things though?

Plugins have are a bit more complex to implement, but at least they sit in the same application so handling the data should be fast.

Any thoughts?
 

The Following User Says Thank You to lardman For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#9
Well, for starters, I know that if it could send a DBUS message, I could fully envision a mbarcode plugin for Shepherd...
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Posts: 2,102 | Thanked: 1,309 times | Joined on Sep 2006
#10
Ok, so I'll add a DBus message which is sent out when a barcode has been decoded, and I'll add one that can be sent to start mbarcode and let the user scan a barcode (and then it will broadcast the result as above).

The other thing to think about is things like web-lookups, etc. It would probably be best if everyone can use the same set of services. Therefore it might well be worthwhile allowing plugins which can handle barcode data and return results (possibly as a DBus message again?) E.g. some webscrapers, AWS type services.

Not sure this needs plugins, just that I don't really want to have to code up webscrapers. I'd be more than happy to have these as a part of mbarcode, and allow external apps to ask for lookups over DBus, or perhaps something like this could be put in an external library so that any interested apps could use it directly (as really mbarcode doesn't need these if all the action other than camera & decoding goes on elsewhere)?

Another thought, related to DBus, is that applications could register an intrerest (e.g. in GConf), so that they will be woken by a specific DBus call when some payload type is delivered. E.g. the geo: tag could be handled by one of the mapper apps, which could be woken by mbarcode, rather than it having to specifically open mbarcode?

Your thoughts, as always, gratefully received.

I should probably also add that this app is in maemo-extras, be careful if you enable the repo, things in there may not work, so don't upgrade willy-nilly if you enable it. YOU HAVE BEEN WARNED
 

The Following 3 Users Say Thank You to lardman For This Useful Post:
Reply

Tags
barcode, camera, mbarcode

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:42.