Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>See the CodeProject article: <a href="http://www.codeproject.com/KB/graphics/barcodeimaging2.aspx" rel="nofollow noreferrer">Reading Barcodes from an Image - II</a>.</p> <p>The author (<a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=1770204" rel="nofollow noreferrer">James</a>) improves (and credits) a <a href="http://www.codeproject.com/KB/dotnet/barcodeImaging.aspx" rel="nofollow noreferrer">previously written</a> VB library to decode barcodes from an image using only .NET code. </p> <p>There are two projects in the downloadable solution:</p> <ul> <li>The barcode library - written in C#</li> <li>The test app - written in VB</li> </ul> <p>I have successfully used the C# code in VS2008 against a JPG image with an extended (includes alpha chars) code 39 barcode.</p> <p>The library has the ability to scan an entire image for a barcode, where the barcode is only a portion. This has good and bad points. It is more flexible, but you may have to parse out noise. Of course, you will want to start with the cleanest image possible. Also, the scanned barcode must be fairly straight, not rotated or skewed at an angle.</p> <p>If you can limit the scan to a "slice" of the actual barcode, you might get better accuracy. </p> <p>In the article comments, <a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2393263" rel="nofollow noreferrer">another user</a> submits <a href="http://www.codeproject.com/KB/graphics/barcodeimaging2.aspx?fid=191552&amp;select=1482523#xx1482523xx" rel="nofollow noreferrer">a function</a> that re-scans the barcode and uses a checksum digit, which is great if you control the printing of the original barcode and can include the checksum in the first place.</p> <p>There are, of course some very impressive (and some very expensive) commercial solutions that have the advantage of being well-tested, more flexible, can scan more barcode formats, and are more tolerant of image quality due to improved image sampling. But this is a good (<em>free</em>) start!</p> <p><em>You will need to sign up with CodeProject to download the code, but that is free also - and worth the time because there is so much good code on that site!</em></p> <p>UPDATE: Incidentally, I just looked at the <a href="http://blog.lemqi.com/" rel="nofollow noreferrer">blog</a> that <a href="https://stackoverflow.com/users/20227/joachim-kerschbaumer">Joachim Kerschbaumer</a> mentions in <a href="https://stackoverflow.com/questions/204008/barcode-image-to-code39-conversion-in-c#204084">another answer</a> to your question. Definitely keep an eye on that project! It looks like a <strong>very</strong> robust solution. If it can read those skewed barcodes from those busy images, then it can do anything!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload