| Reply | « Previous Thread | Next Thread » |
|
Hi all. I might have to develop an application that involves reading a bar code using a cellphone's camera and sending the numeric code via SMS.
Since it sounds like a very useful application, I figured that maybe someone has already done it, so I searched the web. There are some applications out there, but no easily available barcode recognition library that I could find. Can anyone help me? |
|
Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
Offline
Super Contributor
|
|
|
hi,
Quote:
try searching forum for "barcode", I've already seen few tips about how to manually (programmaticaly in that case) convert image data from taken camera snapshot into correct format (that means you need to implement various barcodes format parsers yourself, e.g for ean, upc), there are free barcode libraries for J2SE but not for j2me, so maybe try to find such lib using googling ("java barcode library" as example) and then port to j2me, also visit sun forums, that's quite common question: http://developers.sun.com/forums/ I guess we all wait for JSR-257 implementation: http://www.jcp.org/en/jsr/detail?id=257&showPrint regards, peter |
| peterblazejewicz |
| View Public Profile |
| Find all posts by peterblazejewicz |
|
Are you talking now 1-dimensional (linear) bar codes like EAN, UPC and JAN codes or are you trying to read 2-dimensional barcodes (like PDF417, datamatrix, QR code, etc.
You might find some SDKs available for 2d codes but I do not remember seeing any free SDKs/libraries for "traditional" barcodes. On 2d side semacode has a library available for reading semcode codes (based on datamatrix), Gavitec (now owned by Neomedia, who has been active on 1-dimensional ones in the past) has a Symbian solution for both 1d and 2d codes. Hartti |
|
Huh, I thought 1D barcodes would be easier. That's what I'm looking for, plain old barcodes. Thanks for all the information. :)
|
|
Hi fpolo,
Using phone camera to do barcode decoding, 2D barcode will be easier than 1D/linear barcode as 2D barcode is designed for use with camera compared to specific laser/LED barcode reader/scanner for the linear barcodes. Limitation for linear barcode with camera phone is the size of the barcode you need to capture is wide and it will not be easier to do. Limitation for 2D barcode will be the size of the barcode and capturing distance between the barcode and barcode. Other than Semacode (www.semacode.org), all encoder/decoder needs licensing to get your hands on their SDK. You will also need to write your own codes to do what you wanted to perform. I did spend a good 3 months have my mobile application to work with 2D barcodes. Have fun! Jason |
| break10ose |
| View Public Profile |
| Find all posts by break10ose |
|
I've done this in an open-source C++ project: see http://sourceforge.net/projects/readbarc/. But don't underestimate the difficulty. Cameraphones have optics designed for faces and larger objects -- to get a large enough photo of a barcodes you have to move phone close enough so that the image is well out of focus. So you have to do some modeling of the out-of-focus barcode and compare that to the image you actually get. Even then, it's hard; my barcode reader, which I believe to be the best out there, works welll only for good images of flat barcodes, like the ones on cereal boxes and the like. It's not nearly as good as a laser-based supermarket barcode reader.
-- Jon Webb |
|
Thanks for all the help. It's way harder than I thought; the camera resolution would be enough, but jonawebb is right... a normal-sized barcode is way out of focus, the lines blur. I'll probably give up, at least for now (the job I wanted to use the cellphone for involves potentially dirty barcodes, out in the open... I don't think I'll ever be able to read those reliably).
BTW, with a 6630 even using ReadBarC I was unable to read anything. Is the red rectangle supposed to be *that* small? To fit the whole barcode inside it, I have to keep it about a half meter away from the camera. |
|
Yep, I made it that small to get better focus. I find it works best on barcodes printed on boxes -- like cereal boxes -- that are not too shiny or too small.
|
|
I see. There's a phone... the 3650 IIRC... that has an optional lens to focus on near objects. Mmm... that might help.
|
|
|
|
I have just completed a very similar project to this. There is very little information around that will be of help to you. But here is something that may help you:
Find the tutorial on the nokia site on how to take an image from the camera. Then find some info on how to manipulate images, i.e. individual pixels. Take a section of the pixels (slice across the centre) and convert them to monochrome. With this data all you need to do then is find out how to read a barcode. How you do it depends on what type of barcodes you intend to read. |
|
Ohh sounds great. Could you post a link to your project or isn´t it open source?
Greetings from Germany Hannes |
|
Hi. I've ported ReadBarC to J2ME and made some speed improvements. Also added EAN-13 barcode recognition. See http://sourceforge.net/projects/readbarj.
Jon Webb |
|
Hello
I have try to execute your project, but I have some difficulties. First, could you confirm, you used jmunit and j2meunit. Why you use 2 unit testing framework ? Do you use carbide.j to generate you .jar files ? When I run the tests, I have one test that fails : This test fails : assertEquals("074470021902", result); Could you correct this please ? Thanks for advance. Nara20 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Problem with reading a file........ | rafeeqpv | General Symbian C++ | 0 | 2005-11-15 14:09 |
| Reading given number of bytes with RSocket::Read() | luweiewul | Symbian Networking & Messaging | 1 | 2005-07-15 06:57 |
| Reading barcodes from handphone screens.. | sourabhs | Mobile Java General | 0 | 2004-07-20 07:18 |
| Barcode reader connecting to 9210i | gill_osullivan | PersonalJava | 0 | 2003-03-19 13:45 |
| cimd tool query | sandhya_3753 | Smart Messaging | 0 | 2002-08-20 05:48 |