Author Topic: The best camera for barcode reading  (Read 3739 times)

0 Members and 2 Guests are viewing this topic.

Offline KemmeTopic starter

  • Contributor
  • Posts: 26
  • Country: pl
The best camera for barcode reading
« on: May 05, 2019, 09:15:09 pm »
Hello all

I am trying to build a barcode reader with just raspberry pi + webcam set.
What are the most important camera specifications for barcode reading? Is it resolution? I have Creative Live! Cam Sync HD and it's mediocre. Sometimes it requires a lot of aligning untill it is finally able to scan the barcode. Seems like I'll have to buy another one but I don't know what to look for.
http://dot2pic.com - bitmap to data array online.
 

Offline TopLoser

  • Supporter
  • ****
  • Posts: 1925
  • Country: fr
Re: The best camera for barcode reading
« Reply #1 on: May 05, 2019, 10:04:18 pm »
Post an image that you’ve captured that you can’t read and I’m sure you’ll get some constructive comments.

Lighting, resolution, contrast, focus, decoding software... there are so many variables it’s certainly not simply a question of better resolution.
 

Offline pwlps

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: fr
Re: The best camera for barcode reading
« Reply #2 on: May 05, 2019, 10:27:30 pm »
Sometimes it requires a lot of aligning untill it is finally able to scan the barcode.

I'm curious: what do you mean by "lot of aligning"  ?   I'm not expert in the field but I thought the software can always find barcodes at any orientation or skew, e.g. by analysing the Radon transform of the image.
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2323
  • Country: us
    • medpants.com
Re: The best camera for barcode reading
« Reply #3 on: May 06, 2019, 02:22:45 am »
Have you tried different lighting conditions?  A lot of image recognition algorithms perform a lot better in optimal lighting, so you may be able to get substantially better results with just a bit more light (or positioned in a way to not be reflective).
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38085
  • Country: au
    • EEVblog
Re: The best camera for barcode reading
« Reply #4 on: May 06, 2019, 03:15:32 am »
I'm just using one of those cheap arse pencil type USB microscopes
 

Offline KemmeTopic starter

  • Contributor
  • Posts: 26
  • Country: pl
Re: The best camera for barcode reading
« Reply #5 on: May 06, 2019, 07:40:49 am »
I use Zbar library for scanning.

Two examples. This one was not scanned:


This was scanned. I just moved the camera one centimeter closer to the barcode.


Lighting seems to be ok. Does it look like a camera issue? Or maybe it's just the Zbar library? What do you think?
http://dot2pic.com - bitmap to data array online.
 

Offline todorp

  • Regular Contributor
  • *
  • Posts: 77
  • Country: it
Re: The best camera for barcode reading
« Reply #6 on: May 06, 2019, 09:44:05 am »
You could try Scandit library (also available for linux) though it is commercial software. It works really well under different lighting conditions and barcode distortions...
 

Offline TopLoser

  • Supporter
  • ****
  • Posts: 1925
  • Country: fr
Re: The best camera for barcode reading
« Reply #7 on: May 06, 2019, 09:45:25 am »
Yeah that first image is pushing it, lack of resolution means you’re struggling even by eye to pick out the narrow bars reliably. I just printed it out and used a couple of £2500 industrial scanners and they couldn’t decode it.

Good cheap easy test is print it out and use the zbar app on your phone, if that can’t read it then improve the image quality.

Turn off image compression as well, that’s introducing some nasty artefacts in the image between bars.
« Last Edit: May 06, 2019, 09:47:28 am by TopLoser »
 

Offline jeremy

  • Super Contributor
  • ***
  • Posts: 1079
  • Country: au
Re: The best camera for barcode reading
« Reply #8 on: May 06, 2019, 12:38:01 pm »
I use a Logitech C920 (purely for the resolution) and a nice bright lamp. From those pictures, it looks like you could use some brighter light to counteract what looks like the high noise floor of your sensor.
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2323
  • Country: us
    • medpants.com
Re: The best camera for barcode reading
« Reply #9 on: May 06, 2019, 03:50:55 pm »
Agreed that the top image looks pretty low res for it to work - when you start having trouble making out the details by eye, it's not likely going to work so well.  Maybe it's a configuration issue, then?  Is it possible to increase the resolution available to the software from the same camera?  Otherwise, maybe you want a camera with a narrower field of view - that would give you the closer looking picture at a similar or farther difference, which may suit the application better than a fairly wide field of view general use camera.
 

Offline Twoflower

  • Frequent Contributor
  • **
  • Posts: 739
  • Country: de
Re: The best camera for barcode reading
« Reply #10 on: May 06, 2019, 04:14:43 pm »
As TopLoser said that the very expensive equipment had problems with the further away picture I saw this as a small challenge. Not printing, but on a Laptop-screen (1:1 zoom factor) and a P9 Lite with the app 'Barcode Scanner' from Cognex Corp. (not related to that). No big problems (2-4 search rounds) to read the code from the screen. It seems that some software is better to guesstimate that a light gray area is probably two thin lines. And because of this there's no need for the full resolution. But how they do that exactly I don't know.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9914
  • Country: us
Re: The best camera for barcode reading
« Reply #11 on: May 06, 2019, 05:25:58 pm »
It would seem to me that buying a commercial bar code scanner would be the easy way to get the data.  Lighting isn't an issue, rarely does orientation matter and, apparently, these devices look like a keyboard.  I haven't played with one but it seems pretty easy to integrate.  At least one states that it works on Mac OS, Windows and Linux (Raspberry Pi?) and talks to popular productivity software.

https://www.amazon.com/s?k=barcode+scanner&ref=nb_sb_noss_2
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf