# Barcode Reader flatbed scanner



## a59303 (May 26, 2009)

Hi,

this is my first post here, as I am a new user to FreeBSD.  I like it quite a lot.

I'm wondering if anyone knows of or has any ideas about using my flatbed scanner to decode bar-codes.  I've seen plenty of information about Encoding them but not reading them.  It seems like it should be the same thing.  Considering that I am not knowledgeable in the ways of programming I wouldn't know but it seems that if you can make a BMP to print out you should be able to scan a BMP to read.

Any suggestions/ideas/responses 
would be appreciated,

thanks,

a5'


----------



## Oko (May 26, 2009)

a59303 said:
			
		

> Hi,
> 
> this is my first post here, as I am a new user to FreeBSD.  I like it quite a lot.
> 
> ...



Why would you want to decode bar-code with flatbed scanners?
Those are for photography and documentation. Bar-code readers
are well supported on all BSDs and trivial to use. They are attached to kernel as keyboards. In essence reading a bar-code is like typing the product number. 

Check misc.AT.openbsd archive. We have discussed last year use of bar-code readers/scanners in detail.

http://marc.info/?l=openbsd-misc&r=1&w=2


----------



## a59303 (May 26, 2009)

> Why would you want to decode bar-code with flatbed scanners?


Essentially because I don't want to buy a reader, and its kind of a curiosity.  I will check further at your link,  

Thank You

a5'


----------



## Oko (May 27, 2009)

a59303 said:
			
		

> Essentially because I don't want to buy a reader


I do not think that you fully understand what bar code is nor what flat bed scanners are. Some background reading would really help you.


----------



## a59303 (May 27, 2009)

You are probably right.  I will read up on the two of them, but I don't see why it matters... To me the scanner, either reader or image, is just a way to get information into the computer (which then processes the information).  I did see while I was investigating before I posted that readers store the information in memory (and process the information) and then dump the info into the computer as a keyboard.

This does indicate that the are different.  What I don't see is why whatever the hardware on the reader does is not mimic-able for software.  I did follow the link that you provided and discovered that one of the things I suspected may well be true, that is, there is a market niche for those readers and they are not actively imitated.  This message seems to indicate that.

Again, I will read up on the two,


Thanks

a5'


----------



## mdhughes (May 27, 2009)

Take a look at gocr, it looks like it decodes code128, UPC/EAN, code39 (code 3 of 9).  It is in ports under graphics/gocr.


----------



## a59303 (May 27, 2009)

> Take a look at gocr, it looks like it decodes code128, UPC/EAN, code39 (code 3 of 9). It is in ports under graphics/gocr.



I'll check that out.  I also found the swipe toolkit elsewhere online.

I will definitely check that out later tonight,

thanks,

a5'


----------



## a59303 (May 28, 2009)

I got gocr and its working on my computer but I have to get the xsane to work... my computer detected my canon m150 at the usb port but I think its only as a printer ( its a printer/scanner/copier).  I'll have to spend some time on this but I've made a great deal of progress towards this effort.

I appreciate the help, tomorrow I will spend more time on it.


-it appears that the graphic interface uses xsane to scan a document, so that you can get it directly from the scanner.  I have not found a way to scan from the command line, with gocr, or otherwise..SO, I can't find out whether gocr actually interprets bar code or if its soley for ocr.  I saw mention of it on the sourceforge page but can't verify until I try.

Thanks Again mdhughes, and Oko for the responses


a5'


----------



## Oko (May 28, 2009)

a59303 said:
			
		

> -it appears that the graphic interface uses xsane to scan a document, so that you can get it directly from the scanner.  I have not found a way to scan from the command line, with gocr, or otherwise..SO,



man scanimage


----------



## mdhughes (May 28, 2009)

a5' 
  I was able to decode both 3of9 and UPC codes with gocr on my machine.


----------



## a59303 (May 29, 2009)

*Reading barcode image (solved)*

OK, Thanks,

I'm going to be busy for the weekend, and I didn't think to just check a barcode from wikipedia (for example) so I'll take your word for it.  When I get back to this I'll be working on the printer issue.

I think I'll mark this thread as solved.

a5'


----------

