in my asp.net mvc application on Register Form when users are using barcode scanner to insert data to textbox ,they say that it misses some portion of code like if they scan 02501603566 they get 02501602566 or 01301103564 can be 01301403564 after register.can barcode misread some data? i tested on my barcode and everything works fine.customers have big amount of data so they cant check every time what they have scanned in input.this can happen 1 times in 100..
Yes its not only possible that a scanner misreads are barcode, it definitely happens. 1D barcodes are the worst, but also cheap readers and readers configured improperly for the type of barcode being read can also be a problem.
If you are in control of the code, use a barcode with the appropriate error checking (and there are many).
Also check your barcode reader settings (they all have them).
If all else fails check the barcode with a different scanner or barcode reader app and check if its the fault tolerance of the scanner itself.
Misreads in the form of a perfectly scanning but wrong barcode can be
caused by scanner number substitution
Somehow the printed barcode image is wrongly decoded by the scanner. A poor quality printed barcode can contribute to this, but barcode structure also contributes. UPC is notoriously vulnerable to number substitution of 1 and 7, and 2 and 8 characters
Low ISO Decodability scores can contribute to barcode misreads,
especially when they are caused by pixel rounding in the print process
This is most common in a thermal or thermal transfer printing but it can also occur in ink jet, DOD and other digital printing systems
Scanners can also misread otherwise acceptable barcodes. Most often
the cause can be traced to damaged or dirty optics, but faulty decode
algorithms area known cause, albeit a rare one
Older, high-mileage scanners such as lasers tend to be more prone to misreads than newer, more sophisticated digital area imager scanners.
If a calibrated, ISO compliant verifier decodes and assigns an acceptable grade to a misreading barcode, one can be confident the cause lies with the scanner and not the barcode itself. This is yet another example of how a scanner cannot effectively serve as a verifier
Related
I am trying to OCR and extract the email form the images. The images are supposed to have one line of text which is the email address.
I am using EmguCV.OCR to extract the text (email address) from those images. The target is to have 100% accurate result.
We can fix the font and size of the text. For example Ariel, 12pt, so that all the images will have email written in Ariel 12pt with black on white background.
The problem is that Tesseract OCR in EmguCV is not recognizing the text properly. It recognizes only 80% of the characters accurately.
I am using preprocessing with Leptonica library.
Here are some sample images I am trying to recognize.
Is there any way to achieve the target of 100% accuracy
With those sample images I can suggest two ways to solve the same problem. In those images JPEG artifacts are present (the result of lossy compression). Because of this, the letters are becoming connected to each other (zoom in on the image in a program where you can see the actual pixels, windows photo viewer worked fine for me). TesseractOCR relies on spacing between letters (it uses connected components) to do character recognition. Have any pieces connected throws off the recognition process which means it tries to recognize the combination of "co" as one letter.
Two possible solutions:
I'm not sure what preprocessing steps are already being done, but you'll want to do some thresholding to removing the lighter shades on the image (disconnecting the characters). However, you have to be careful with this as it may remove more than what you want.
If at any time during this process you have a higher resolution image, or a non-jpeg/lossy format (i.e. png), then keep it in this format as you do other processing steps. Try to avoid any lossy compression that might happen. It sounds like these images don't come to you as shown above. This is the preferable solution as you wont risk losing too data.
I tried to recognize your images with ABBYY Cloud OCR SDK and got 100% accuracy.
You can use Demo Tool to make sure of recognition accuracy.
I work for ABBYY and can give you more information about our technologies if you need.
I am designing a website for PUBLIC TRANSPORT TICKETING SYSTEM using ASP.NET c# and MSSQL..So when a customer registers in the site, I want to send SMS with a barcode to him to use that in the bus to validate him..
so in the bus there is KIOSK and also a barcode reader..When he get into the bus first he has to validate himself..
So i want to implement this : when the passenger shows the image of the barcode in his mobile the barcode should compare it with the database and if it's validated proceed if not give an error message..
plz consider my question and kind be enough to reply..
Thank alot..
Usually barcodes are compared as strings, not as images. Note that it's not recommended to store the barcode as image in the database. You simply can store the barcode value (string) in the database and compare it with the barcode recognition result.
We currently generate barcodes (Code 93) using a 3rd party toolkit named leadtools. This toolkit gives you the ability to read\write common barcodes. For more information, see the following link:
http://www.leadtools.com/help/leadtools/v175/dh/to/leadtools.topics.barcode~ba.topics.programmingwithleadtoolsbarcode.html
Barcodes are NOT generally implemented by image comparison.
Rather, the barcode evaluates to a string or number, which is then a PK into a backend database somewhere.
(Eg, check on any product in your kitchen pantry. The barcode will often have a human-readable version of the number that the barcode represents, written below the barcode).
You've specified there's a barcode reader in place... This will do the "heavy lifting" of reading the barcode and passing the resultant string/number into the system.
I've been looking for solutions and so far the best one I think for my project is to use a free Code 39 font. However, I've tried printing some samples and my barcode scanners can't read them.
I researched a bit more and stumbled upon this.
I printed Code 39 barcodes using that library and it worked just fine, the scanners are able to read them.
Problem is, the library is written in C# but not for ASP.net. I've tried playing around with the code but it's too complex for my basic knowledge. There are a lot of functions included in that library code and has a lot of other barcode types, making it harder for me to analyze.
Are there other ways to generate a Code 39 barcode? The library in codeproject seems a little to complex for my requirements.
Barcode scanners require your code 39 barcodes to be prefixed and suffixed with asterisks to read. Example: *12345*
First off, you say the library isn't written for ASP.NET, but if you can produce images with it then the easiest thing to do is write an HttpHandler that sits overtop of the library and returns the generated images to the browser. If it's a .NET library, I don't see any reason why that shouldn't work.
That being said, there are a couple things to look out for when generating Code39 barcodes:
Are you producing a valid Code39 barcode (see other answers, a Code39 barcode should start and end with *)?
Is the barcode you are printing sharp enough to be scanned?
For #1, I would check to make sure the images you are printing from your Code39 font look the same as the ones from the library. If they are, then image quality is probably the issue.
As far as #2 goes, I've successfully used a free Code 39 font with GDI+ to generate barcode images that I then displayed in HTML pages for printing. One of the problems I ran into when trying to scan the printed barcode images was that the images were not sharp enough (the edges of the barcode lines were blurry) and were not able to be read by the scanners.
The way I got around low quality images was to generate a large Code39 barcode image (say 1000 x 400), and then on the <img> tag that was displaying that barcode, I would set the width to something much smaller, say (200px, or 2.0 in). I would be sure to set only the width, the height will scale proportionally with the image. That would effectively increase the DPI of the image when it is printed, allowing us to produce barcode images that are easily able to be scanned (especially if you are printing using a laser printer).
EDIT
Almost forgot, one other good practice to use when generating these barcodes is to always print what you are barcoding underneath the barcode image. That's your failsafe in case the barcode image will not scan for whatever reason. You can see an example of this if you look at any standard UPC symbol. The numbers at the bottom are exactly what the barcode will read when it is scanned.
I have a multi-page document that is being scanned. Sometimes, either because the document was a fax or simply a bad scan, the barcode reading software cannot determine the value of the barcode.
The barcode could be on any page within the document, however, this page should be the "header" page and moved to the front. How can I automatically detect that the image has a barcode when the value cannot be read with typical barcode reading tools?
The usual barcode type is Code39, but sometimes it could be DataMatrix. I am mostly concerned about detecting mis-read Code39, as I think it will be easier to detect.
Maybe take a look at:
http://code.google.com/p/zxing/
I am generating a barcode label and sending it to the user as a .pdf (this is a web app). The user has already purchased barcode labels that are only 2 inches wide. I want to use an image so that I don't have to install fonts on all of the users machines that will be using the web site. I am able to get the barcodes small enough if I use fonts from IDeautomation.com but I would much rather use an image generated using BarCodeRenderer
or some other opensource project but I can not get the barcodes small enough as the system has pre-existing ID's of around 20 characters in length. What is the smallest Barcode font (I am trying to use 128 as the IDS are alphanumeric) and how can I resize the generated image in a way to make it fit in the width that I have available?(Other ideas or Libraries that do this are also accepted as answers)
IDautomation has several products.
Specifically they have one for Crystal reports with a Code 128 checksum calculator. It bypasses the need for a font and generates the font right in the report, which can go straight to PDF. The smallest size I have been able to use this feature is at about 12 point font. Specifically they have broken down the Code 128 font spec to allow you the smallest barcodes possible. This does not render as a font, or an image as far as I recall.
Alternatively I recall them having a product that will render a font as an image.
Another product that might be useful is Barbeque. Maybe you can find something along that line.
The other factors that weigh in when trying to print and read small barcodes are:
How long is the value that you are encoding in the barcode. 20 Characters is a lot.. Is there any way you can concatenate it, or shrink it somehow? Tricks I have used in the past include using a hashed value (or record number) that would link to all the values I needed. The shorter you can get your barcode, the smaller you can make it and still have it super clear.
Will the barcode get longer over time? If so, you might need a wider label, or consider a different format. I am starting to like a few of the 2D barcodes a lot.
Label material. I have seen issues with using colored or overly shiny labels instead of white, matte ones making it much harder to read.
The barcode readers can make a big difference. Having a laser based reader instead of an optical based one will give you greater resolution in reading barcodes. This means you can read them from further away, or read smaller ones. Symbol has some great $150 laser based barcode scanners.
The bar code printing and reading systems I've worked on have done in the range of a few million prints and reads with barcodes of small to medium sizes, so I hope some of the suffering and learning I've had above helps!
What I've done is to take the barcode and make it fit the width that I want by resizing it down. What then happens is that the height is not good enough for most readers, so I copy the image and duplicated it above it, so it now is the width I want and double the height of the generator. That makes it more readable to most common off-the-shelf barcode readers.
If your barcodes only consist of an even number of numeric digits, you can quite easily switch to the Code C variant to get them down to half the size.
Generating a small barcode as an image in a PDF is going to be error prone, since you can't optimize to the dot size of the printer. Your barcode widths are going to be off by plus or minus half a dot; the wider your bars are, the less of an issue this will be. I've worked with label printers that are 203 DPI, and they would be nearly impossible to support with a generic image. Fonts are better since they can be hinted to be an exact multiple of dots. I don't know if any of the commercial barcode fonts have the necessary hinting, but I presume at least one of them does.
I have had good luck using Data Matrix format as you can have varying amounts of data, and you can size the barcode as you wish.
Here are some links that may help:
libdmtx
Aspose.BarCode for .NET and Java
Barcode Writer in Pure PostScript
The checkbox "Use Unicode UTF-8 for worldwide language support" should not be checked.