473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

decode a barcode from image

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.

Thanks in advance.

Krishna


Jul 22 '05 #1
9 5941
"Krishna Sagiraju" <sa******@gmail.com> wrote in message
news:d3******************************@news.teranew s.com...
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.

Thanks in advance.

Krishna


I wrote some type 128 barcode reading software not too long ago using
information from this site:

http://www.adams1.com/pub/russadam/128code.html

My employer might not like me sharing the software with you but I can give
you the outline of the algorithm:

1) average down to 1D
2) determine the location of all edges using gray interpolation
3) subtract to get the width of each bar and space
4) estimate the scaling factor which makes each bar and space approximately
1, 2, 3, or 4 times the smallest one
5) decode as shown on the website

Of course this assumes you are reading type 128 barcodes. Other types work
about the same except for the encoding.

--
Cy
http://home.rochester.rr.com/cyhome/
Jul 22 '05 #2
Cy Edmunds wrote:
"Krishna Sagiraju" <sa******@gmail.com> wrote in message
news:d3******************************@news.teranew s.com...
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.

Thanks in advance.

Krishna

I wrote some type 128 barcode reading software not too long ago using
information from this site:

http://www.adams1.com/pub/russadam/128code.html

My employer might not like me sharing the software with you but I can give
you the outline of the algorithm:

1) average down to 1D
2) determine the location of all edges using gray interpolation
3) subtract to get the width of each bar and space
4) estimate the scaling factor which makes each bar and space approximately
1, 2, 3, or 4 times the smallest one
5) decode as shown on the website

Of course this assumes you are reading type 128 barcodes. Other types work
about the same except for the encoding.

Thanks for your reply. But right now i'm not able to efficiently detect
a barcode with in the image. Is there any kind of library that would do
that?.. by the way i'm using linux.

the web page is very informative.. and that sure would gimme a decent
start ... I'm really thankful to you...


Jul 22 '05 #3
On Sat, 12 Jun 2004 14:47:47 GMT, "Krishna Sagiraju"
<sa******@gmail.com> wrote:
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.

Thanks in advance.

Krishna


Do yourself a big favor and visit this site:

http://www.axtel.com

They have DLLs with C-style interface (for Windows) as well as ActiveX
objects which read and write just about every kind of barcode
available. They handle lots of image formats as well. You can download
a free demo from their website.
--
Bob Hairgrove
No**********@Home.com
Jul 22 '05 #4
Bob Hairgrove wrote:
On Sat, 12 Jun 2004 14:47:47 GMT, "Krishna Sagiraju"
<sa******@gmail.com> wrote:

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.

Thanks in advance.

Krishna

Do yourself a big favor and visit this site:

http://www.axtel.com

They have DLLs with C-style interface (for Windows) as well as ActiveX
objects which read and write just about every kind of barcode
available. They handle lots of image formats as well. You can download
a free demo from their website.
--
Bob Hairgrove
No**********@Home.com

I'm sorry i forgot to mention i'm working in linux. I'm really sorry for
my mistake.

Jul 22 '05 #5
Krishna Sagiraju wrote:
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.

Thanks in advance.

Krishna


please dont MULTI-post, crosspost instead. you posted this same exact
question in comp.lang.c
Whats the difference?
Multipost - like sending a separate single email to each recipient on your
list (or hitting Reply on an email for every recipient in the CC list and
sending each individual the same reply text)
CrossPost - like sending one email but CC'ing everybody
Jul 22 '05 #6

"Eric" <no****@email.com> wrote in message
news:mtHyc.15179$2i5.3843@attbi_s52...
Krishna Sagiraju wrote:
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.

Thanks in advance.

Krishna


please dont MULTI-post, crosspost instead. you posted this same exact
question in comp.lang.c
Whats the difference?
Multipost - like sending a separate single email to each recipient on your
list (or hitting Reply on an email for every recipient in the CC list and
sending each individual the same reply text)
CrossPost - like sending one email but CC'ing everybody


I'm sorry this is the first time i'm using the groups, I'm not aware of the
etiquettes. Thanx for letting me know i'll follow your suggestion from my
next postings..

sorry once again
Jul 22 '05 #7
[snip]
Thanks for your reply. But right now i'm not able to efficiently detect
a barcode with in the image. Is there any kind of library that would do
that?.. by the way i'm using linux.

the web page is very informative.. and that sure would gimme a decent
start ... I'm really thankful to you...

I couldn't find a free library when I was looking about 2 years ago. I found
some commercial libraries (e.g. LeadTools) but I thought they were too
expensive. I was right too -- it only took me about three days to code and
test barcode reading software which is used successfully every day where I
work.

--
Cy
http://home.rochester.rr.com/cyhome/
Jul 22 '05 #8
On Sat, 12 Jun 2004 15:50:34 GMT in comp.lang.c++, Krishna Sagiraju
<sa******@gmail.com> wrote,
Thanks for your reply. But right now i'm not able to efficiently detect
a barcode with in the image.


I guess that you should not try to detect the barcode first and then
decode it. Instead, apply the decoding algorithm to all parts of the
image; when one of them passes the barcode quality and checksum test you
have both detected and decoded it.

Jul 22 '05 #9
Krishna Sagiraju wrote:
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.

Thanks in advance.

Krishna


Since you don't have an issue about the C or C++ languages,
I suggest that you visit either news:comp.programming or
one of the news:comp.graphics.* newsgroups. Your task does
not depend on the language, but rather file formats.
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library

Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: | last post by:
Hi all, we have a need to barcode encode and display a record identifier (number) both in html in the browser and through fdf in adobe acrobat in realtime. Is this possible? Can anyone make any...
1
by: Aaron Bronow | last post by:
I have an asp.net application which loads a Crystal Reports ReportDocument, passes in parameters for selecting data from the report's database connection, renders the report for previewing on the...
6
by: Big D | last post by:
I am working on an online promotional deal for a client where I need to be able to create a barcode that can be redeemed at checkout of one of their branch stores. Has anyone worked with this...
11
by: youngster94 | last post by:
Hey all, I've written a VB.Net app that creates picture badges complete with barcodes. The problem is that the barcode quality is not good enough to be read by scanners. I'm using the...
2
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi, I have an application with a barcode in the Image. I want to read the barcode from the image using program. Image resolution is 120 X 120 DPI.I tried to read thru different barcode SDKs...
0
by: james.duckworthy | last post by:
Python programmers may find the application to decoding an encrypted map image format known as Memory Map to produce a standard PNG image file interesting. Someone obviously very well versed in...
4
by: kurapix | last post by:
Hi there!!! I've been working on recognizing EAN barcodes from images. Yes it's about recognizing barcodes from images but from bars not from the digit with the help of OCR software but with...
7
by: divyac | last post by:
I am doing an inventory control project and i want to create barcodes for the products in addition to the product details in a form.The form values should be submitted to the database to retrieve for...
13
by: daniam | last post by:
I am working on write a program that reads and writes from the barcode my problem when writing (send command to barcode) I read in pdf manufacturer barcode that the command of capturing the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.