Re: Barcode Reading
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Mon, 18 Jun 2007 16:08:02 -0400
While it is true that scanning at twice the resolution takes longer, it gives you much
higher resolution which is what is required.
For example, from
http://www.adams1.com/pub/russadam/39code.html
The X-dimension is the width of the smallest element in a bar code symbol. The minimum
X-dimension for an "open system" (a bar code label that will be read by scanners from
outside your company) is 7.5 mils (a mil is 1/1000 inch) or 0.19 mm. The "wide" element is
a multiple of the "narrow" element and this multiple must remain the same throughout the
symbol. This multiple can range between 2.0 and 3.0 if the narrow element is greater than
20 mils. If the narrow element is less than 20 mils, the multiple can only range between
2.0 and 2.2.
The height of the bars must be at least .15 times the symbol's length or .25 inches,
whichever is larger. The overall length of the symbol is given by the equation:
L = (C + 2)(3N + 6)X + (C + 1)I
where
L = length of symbol (not counting quiet zone, dimension will be in mils)
C = number of data characters
X = X-dimension (width of the smallest element in mils.)
N = wide-to-narrow multiple(use 3.0 if your code has a 3 to 1 ratio, etc.)
I = intercharacter gap width
Note that the maximum value (based on the Code 39 specification) for I is 5.3X for X less
than 10 mils. If X is 10 mils or greater, the value of I is 3X or 53 mils, whichever is
greater. However, for good quality printers, I often equals X. I, strictly speaking,
equals X-t where t is the print tolerance in mils. If you do not know the actual value for
t, you can calculate the length using the maximum value for I and calculate the minimum
value setting I=X.
========================================
At 120dpi, the smallest detail you can scan is 0.008 inches (one pixel). To resolve an
image of 0.0075, you would need to scan at a resolution of 0.00375 (the Shannon-Nyquist
sampling theorem demands this), which suggests a minimum scanning of 266dpi (these were
based on the idea of 300dpi printers being able to print the labels).
Note that since the "wide" images can be 2x, you don't have enough information at 120dpi
to resolve detail at that granularity, because again, according to Shannon-Nyquist, the
best you can hope for, particularly in the presence of aliasing artifacts of the scanning,
would be 0.016 inches, which is better than 2x the specified resolution.
So for conforming bar codes, 120dpi isn't going to do it. If you have very wide bar
codes, that changes the picture.
joe
On Mon, 18 Jun 2007 11:23:03 -0700, Rinu Gopalakrishna Pillai
<RinuGopalakrishnaPillai@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Joseph,Joseph M. Newcomer [MVP]
Thanks a lot for yuor detailed reply.
I have a scanning appliaction; which uses the pearsons 5000i
scanners.The native image size is 240 X 120 DPI. Most of my barcodes are
vertical one( ie; 120 DPI). If I increase the resolution into a 240 DPI then
it will slow down the scanning process.Now I am using physical barcode reader
for reading barcodes , I want to replace it with a software solution.
Your advices will be highly appreciated
Thanks and Regards
Rinu G Pillai
"Joseph M. Newcomer" wrote:
How big is the barcode in that image. 120x120 seems awfully poor resolution for a bar
code. I did bar code software some years ago, and we were reading 600dpi and the bar code
was over an inch long, and even then we had to tweak a couple parameters of my recognizer
to get it to be reliable (the intergap and wide-line sizes had to be made one pixel
larger, as it turned out, note that was at 600dpi and almost 1000 pixels for the actual
bar code). There were no good libraries in those days so I wrote my own recognizer, took
me nearly a day.
Why are you using such a low resolution for the bar code? Hint: bar codes are VERY
sensitive to black-width and white-width spacing, and 120dpi will not give you enough
resolution if your bar code fills the entire image. Most bar codes (e.g., UPC codes) are
actually narrower, so at 120dpi you might get 100pixels wide image, not nearly enough to
be usable.
I googled for the barcode standards. Go get one, read how rigorous the spacing
constraints are, and then see if a 1-pixel error is enough of an error to matter (it
almost certainly is several times the tolerance permissible)
joe
On Wed, 13 Jun 2007 08:21:01 -0700, Rinu Gopalakrishna Pillai
<RinuGopalakrishnaPillai@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,Joseph M. Newcomer [MVP]
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 available in the market ( like ;
Leadtools , Pegasus , Atalasoft etc..),but none couldn?t read the barcode as
Consistently .
Please let me know if any one knows any barcode reader which read the 120
DPI image.
Thanks and Regards
RGP
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Barcode Reading
- From: Rinu Gopalakrishna Pillai
- Re: Barcode Reading
- References:
- Re: Barcode Reading
- From: Joseph M . Newcomer
- Re: Barcode Reading
- From: Rinu Gopalakrishna Pillai
- Re: Barcode Reading
- Prev by Date: Re: DoModal() in Separate Process
- Next by Date: Re: Why is .NET 2.0 required to deploy an app using VC2005 C++ Setup project?
- Previous by thread: Re: Barcode Reading
- Next by thread: Re: Barcode Reading
- Index(es):
Relevant Pages
|