maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Accessories (https://talk.maemo.org/forumdisplay.php?f=17)
-   -   uising a scanner (https://talk.maemo.org/showthread.php?t=25934)

rek 2009-01-01 07:26

uising a scanner
 
I do some book scouting can would like to use a barcode scanner of some type to read isbn on books,etc and check against info stored on a seperate disk or in my
memory that has been downloaded from one of the many companys that offer amazon,ebay ,etc prices can i do anything like this? this would save me from buying a seperate scouting tool (pda and scanner web access cell phone,etc) not good at all this computer stuff any help greatly appreciated

rek 2009-01-01 07:36

Re: uising a scanner
 
i forgot to mention that i want to find this scanner for a nokia 810 i forgot to mention which nokia I have

Snoshrk 2009-01-01 15:03

Re: uising a scanner
 
@rek

Search this forum for "barcode" (no quotes)

There are several threads that are interesting and may have leads to what you are looking for.

I have been eying a pen style scanner that radio shack put out several years ago (can't remember the name :o) for just this purpose. IIRC from reading the other threads, it is possible to use an USB scanner but the interface / program would have to be written...

Hope this helps:D

Good Luck

Snoshrk

D'ohboy 2009-01-01 15:32

Re: uising a scanner
 
I think there is something about barcode scanning in the GNU Ocr thread.

lardman 2009-01-01 17:03

Re: uising a scanner
 
I'm currently writing an app to do this, using the camera to do the scanning. I've been learning GTK+ and the C interface to SQLite along the way, so is still work in progress, but the code compiles and hopefully gives a decent idea of what I'm trying to achieve.

See https://garage.maemo.org/projects/maemo-barcode/ and specifically the branch I'm working on atm: https://garage.maemo.org/plugins/scm...=maemo-barcode

Using a plug-in scanner as well/instead shouldn't be an issue and I'd like to include this (if you find a cheapish scanner do let me know; life will be easier with the higher quality and pointing outwards camera on the n900).

My plan is to let the user create different tables in an SQLite database (e.g. shopping list, DVDs I own, Books I own, Books I want, DVDs I want, CDs, etc.) so that the user can do a couple of things:

Have a list of the DVDs/CDs/Books they own, so they can check in the shop to see if they're going to buy something they already have (I have this problem with books and DVDs, because I have lots of the former and because I don't tend to watch the latter often enough to remember what I do have).

If the book/DVD/CD in question is not in the db (i.e. you don't own it), allow the barcode (and metadata obtained from the barcode, e.g. isbn from barcode) to be saved and looked up (I need to write some code for a backend server or some web trawling code for the app on the device) to fill in the details of what the item in question is. There are a number of online services which allow this, iirc I left some notes in the source (see above).

I also plan to allow text searches of this data (i.e. the databases will be populated with the barcodes and then these can all be looked up when a connection is available and then the db can be searched using text strings too, just in case the scanner doesn't work/someone asks you a question without giving you a barcode).

Looking at the web trawling, I want to do similar to the Android competition winner Android Scan (http://scan.jsharkey.org/) and once a barcode has been scanned it will be looked up (i.e. fill in desctiption) and also have prices and locations downloaded so you can see if it's cheaper online, etc. This will be easier on the n900 as it will be always connected.

Last but not least are different types of barcodes, 1D stacked, 2D (QR code, Datamatrix) which can store text, urls, etc. We've been working on getting these to be decoded in realtime, and would like to add these in so people can scan them and use the data contained therein (e.g. display/save text, open url, etc.)

I hope that makes some sort of sense :)

Snoshrk 2009-01-02 14:41

Re: uising a scanner
 
FYI:
The USB scanner I have been looking at is the CueCat, ~$10 on eBay.

@lardman

How well does your program work with the N800's camera?

thx

fattomm 2009-01-02 15:00

Re: uising a scanner
 
Quote:

Originally Posted by Snoshrk (Post 253896)
@rek
....
I have been eying a pen style scanner that radio shack put out several years ago (can't remember the name :o) for just this purpose. IIRC from reading the other threads, it is possible to use an USB scanner but the interface / program would have to be written...

Snoshrk

If you're talking about the "cuecat", I just picked one up from e-bay for about $15 (incl. shipping). RadioShack used to give them out years ago. Those on e-bay have been modified for USB and to take out some of the cue-cat specific encoding (originals did something funny with the scancodes, and were PS/2 connected).
http://en.wikipedia.org/wiki/CueCat

It works a treat -- I plug it in to my laptop (running fedora), and it looks like a HID/keyboard type of device. You scan, and input comes in as ASCII terminated with a carriage-return (works great with "gcstar" for scanning in my book collection).

I'd think, though, if the nerd-alarms weren't already going off with you pulling out the NIT, then definitely nerd-alerts would be going off by you pulling out the cat-shaped scanner, and start scanning books. I've already heard of stories of people getting booted out of book stores for scanning and looking up cheaper options online. (Retailers have never taken kindly to "price checkers", and this seems to be arising again with the new iphone/G1 applications...).

I'd prefer a camera based scanner -- a little more subtle ....

Snoshrk 2009-01-02 15:20

Re: uising a scanner
 
@fattomm

Yes that is the one I have been looking at:)

I agree 100%, A camera based scanner would be the preferable solution.

I am in awe of the people on this forum who have the skills / talent to make so many of the cool things for our tablets... :D

eetimm 2009-01-02 16:19

Re: uising a scanner
 
The cuecat works quite well, but it is unfortunately cat-shaped.

I helped create a barcode scanning system for use in a warehouse, using the Nokia 770. Using an N800 (and I assume an 810) is easier because of the OTG adapter that can be used.

The barcode scanner sends the scanned code to the device (PC, N800) as a character string...just as if you had typed it in via keyboard. All conversion takes place in the scanner itself, so you do not need any software to interpret the scan. The cuecat, as mentioned in an earlier post, did some type of conversion when it scanned, so you might not be able to get a clean scan (although I seem to recall that it handled IBSN codes correctly).

We were not able to get laser scanner working on our system as it required too much power from the host to work (we used a powered usb hub and the 770 host mode did not provide power as I recall), but a CCD scanner worked fine. I would think a pen-type scanner would be best in terms of a smaller form factor as well.

Good luck (and now I am out to my garage to see if I can get one of my cuecats to work with my n800!)

ET

qole 2009-01-02 18:52

Re: uising a scanner
 
I would really like to see lardman's camera-based barcode scanner working! It seems to me that the most important part is getting the translation of barcode to ASCII working. If you can get that ASCII code, you could use something like pipeline's DBus Switchboard to send the code as a parameter to user-defined applications.

And yes, as far as I am aware, getting this working on the N810 will mean it will work on the N800 too.

lardman 2009-01-03 00:25

Re: uising a scanner
 
Well the camera stuff works (scan, recognise, decode), it's just the GUI, database and web scraping stuff that I have to finish off.

It works reasonably well with the N810 I have handy atm (with camera facing the wrong way) so should work ok with the N800 too. Needs plenty of light mind you as the cameras are not that great.

Give me a few days and I'll try to get something half usable out.

dgec 2009-01-22 19:10

Re: uising a scanner
 
I've thought of this kind of thing before too, and it sounds great!

I know there's a Palm Treo program that does it too. Hmm... I wonder if it would work on the Garnet emulator?

qole 2009-01-22 19:29

Re: uising a scanner
 
Thanks dgec for reminding me about this...

Quote:

Originally Posted by lardman (Post 254141)
Give me a few days and I'll try to get something half usable out.

OK, few days given :D

lardman 2009-01-22 19:58

Re: uising a scanner
 
Yeah ok, well the GUI is pretty much usable, just searching for some last bugs.

You're welcome to compile it for yourselves of course, and help with the debugging ;)

Few more days, sorry! (busy week this week)

TheGogmagog 2009-01-27 13:49

Re: uising a scanner
 
Not sure if this helps, but there is a website that you can send photo's of barcodes and it will read it and send the info back. My hunch is google, but might not have been. I saw the info here on ITT, the rest of the thread had more ideas apparently the zxing project could be compiled for local use?

You might be able to build an app that automates capturing and sending the image to that website. It would be an interesting addition to knips, the photo capturing program.

lardman 2009-01-27 16:05

Re: uising a scanner
 
The recognition code already works fine on device, no need to send off an image. The question is really how to obtain useful data about the EAN/UPC code from online.

qole 2009-02-02 18:32

Re: uising a scanner
 
I was playing around with dmtxread from the Ubuntu Jaunty repos on the weekend. I was trying to take a picture of a 2D barcode with the tablet's camera and then use dmtxread to find out what the barcode said.

The results were disappointing. The biggest problem is the tablet's camera. It doesn't focus when you get close to the barcode, so I could get a readable picture of a big 10x10 code on a toothpaste tube, but I couldn't get a clear picture of the code on the inside of my second tablet or the codes being used on preprinted postage in Canada. I even used Gimp (again, on the tablet ;) ) to increase the contrast and sharpen the image, but the source image was just too poor...

Frustrating!

lardman 2009-02-02 23:13

Re: uising a scanner
 
There may be ways around that, assuming there's enough lighting to produce sufficient contrast. I've not tried the dtmx code (see the test app in the maemo-barcode SVN) recently, but plan to add that in once I've sorted out the wonders of GStreamer (uuurgh!).

Are there any GStreamer gurus about? The video display widget is going blank when I change notebook page and then change back (I've created pages for the scan window, the database window, etc).

I also experimented with adding in a callback to prevent data being passed down the data analysis part of the Tee, but it seems to stop all data from being passed.

Still some learning to be done :)

If anyone has any bright ideas/code about scanning the interweb once we have an EAN or ISBN number please speak up as currently all one can do is save the EAN/ISBN without any description.

dbowden 2009-02-04 13:13

Re: uising a scanner
 
ISBN.nu seems to be what you're looking for.
Also, check out this site - he was writing an app to use the CueCat to scan books with, and kept notes on parts of his labors.
Most of his comments are out of date, but they might still be useful.

David

dwould 2009-03-08 19:54

Re: uising a scanner
 
This evening I was trying to figure out what film to watch and I thought 'what I need is a barcode scanning app to catalogue my dvd's on my n810' and lo a short search later and I find a project that looks close to delivering what I want. any news on a binary to download? or is it still a case of grabbing from svn and compiling myself?

lardman 2009-03-08 22:26

Re: uising a scanner
 
Still grab from SVN and compile yourself, but I am planning on sending a post to the dev list (when I have the time to sort it out) asking for some help in polishing things up/working out why the video doesn't always display/asking for help with the web scraping. I'll create a binary for that (though it has some fairly major limitations of course)

Soon, I promise, kick me on IRC whenever you see me and get me to do it sooner!

(have been doing wedding organising stuff, so not much time for programming/writing emails lately, sorry!)

ctennenh 2009-03-08 23:35

Re: uising a scanner
 
This sounds great. I'm picturing a Delicious Library type of app for the NIT. It would be very handy.

Snoshrk 2009-03-09 01:43

Re: uising a scanner
 
Quote:

Originally Posted by lardman (Post 269908)
(have been doing wedding organising stuff, so not much time for programming/writing emails lately, sorry!)

:D What you really need is to barcode all of the guests, gifts, cake, pictures, etc. and manage them all from your NIT....:D

lardman 2009-03-09 09:30

Re: uising a scanner
 
Indeed :)

Anyway, here's a binary - some things don't work (yet), you'll need to install SQLite for it to run.

http://people.bath.ac.uk/enpsgp/nokia770/maemo-barcode/

Things that don't work, off the top of my head:

* Camera is a bit wierd, the data gets through and is processed, but often the image is not drawn on the screen - I wonder if this is caused by the analysis thread looping too tightly. Any thoughts?
* Search doesn't work yet (not implemented)
* After adding data to a table, the data is not shown in the data view (until you restart), so I've probably missed out an update call somewhere there (to get my listview to update the view to show the new contents).

Load of other stuff too I'm sure...

Any help welcome of course :), especially for the web-scraping stuff (which atm just returns filler data for the descriptions, etc)

And also my apologies for the pretty scrappy code, I wrote it as I went along, while learning SQLite and GTK+, so I'm quite sure there's lots of things wrong/bad form :)


All times are GMT. The time now is 01:15.

vBulletin® Version 3.8.8