Hai, I gotta decode a barcode from an image ( ppm, bmp, or jpg). I realize the first milestone would be to recognize a barcode with in the image:
I took a small window (say 80X80 pixels) and if a barcode is present in this window all pixels horizontally would have the same values. Well as you can see this is not perfect. I'm right now working with PPM image.
and then to decode the barcode itself (which i've no clue how to do).
I've searched the for a long time but could not find any help regarding barcode decoding. I would appritiate if any of you can provide me any help at all.
"Krishna Sagiraju" schrieb in news: snipped-for-privacy@news.teranews.com:
The first step should be to find the orientation. Are the lines paralell to the border? If not, you should first rotate the picture or find the orientation.
What kind of bar code? EAN, UPC, Code39............ There are so many coding schemes for bar codes.
Please allow me to explain the senario, I use a ccd camera to capture the image, then i need to check the image for a barcode, which still remains my primary objective, and let's assume the barcode is parallel to height and that i;m working with code 128 currently. If i sucessfully implement the decoder i would consider other encodings. Oh! i forgot to mention i'm using Linux.
The Bar Code Book: Reading, Printing, and Specification of Bar Code Symbols by Roger C. Palmer
"
formatting link
""
formatting link
"
Depending on your application, you can limit the symbologies. The type of bar code you use depends a great deal on the application. For instance, 2D bar codes pack so much info they can be used without access to a DB. Code3of9 have a richer information set (similar to track 1/3 of a magnetic card) allowing numbers and alpha characters. These are typically used on skids of merchandise and hence are common in warehouse application. UPC is the de-facto for consumer/retail uses. These only include product numbers that are managed like a MAC addresses. One portion represents a manufacture another is the specific product.
You really need better requirements. Either from your boss or if you are doing this on your own, try to figure out exactly what you are doing. If you limit to a few symbologies, pre-processing to find the "barcode" is unnecessary (as another poster noted). However, if you do
*all known* symbologies, you will pick up barcodes in noise. Some seldom used barcodes have no redundancy and you can _erroneously_ read "blue jeans" or anything with striped patterns on it.
fwiw, Bill Pringlemeir.
--
I can remember when the air was clean and sex was dirty. - George
Burns
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.