 |
|
 |
I downloaded this project and copied the code into a Windows Mobile Project. The only things that wouldn't build were the flip and rotate parts, which I removed. But the app now produces run time errors.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The error is on this line: BitmapData bmData = bmp.LockBits(new Rectangle(0, startheight, bmp.Width, endheight - startheight), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
Debug shows that the values of the items are (0, 0, 640, 48 - 0) and it says "Value does not fall within the expected range" (System.ArgumentException in System.Drawing.dll)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi friends I am trying to read values from barcode images can any help me how to achieve this one i am c#.net
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Hello,
If I make a print screen from the image the example provides and paste it to Paint and then save it as a tiff image, for instance, I will still be able to read the barcode.
However, if I open Word and crete a barcode usinf a 30f9 font and than make a printscreen and paste it to Paint and, finally, save it to a tiff (or other image type) file, despite your program will find a barcode while performing a scan page, it get get the right data...
So, my question is, how are you generating the codebar images? Is it necessary to include any sp+ecial character on the value of the codebar?
Thank you
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
To what i read in the sourcecode. The application only works for one ratio of the 3of9 barcode. 3of9 barcodes can have a barcoderatio. This is the ratio between the thinnest and the thickest barcode line. So when you generate the barcode in word see if you can change the barcoderatio.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Anyone care to give me some pointers on how to upgrade this project to read code 128 barcodes?
thanks in advance
|
| Sign In·View Thread·PermaLink | 1.67/5 (3 votes) |
|
|
|
 |
|
 |
First,Thanks for your code. I have some question for you. How to dectect a barcode if its image is too bad or it's a blur image? How to indentify barcode region in a large image?
Rich + Handsome = Amorous
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
> How to dectect a barcode if its image is too bad or it's a blur image?
I don't think you can. Some image sharpening MIGHT help, but I don't know how to implement that. Blurred barcodes are like blurred pictures. If the information isn't there in the first place, nothing you can do will get it.
> How to indentify barcode region in a large image?
As said in postings earlier:
In my experience, most barcodes begin and end with *
However, I have also seen a model with a fixed number of characters, which is more difficult to parse out.
Also remember that there may be text on the same scan line as your barcode, so your result in the arraylist may be something like:
kjh4#u*SURPRISE*fvj
Still, it's pretty easy to parse out useful text from this.
The more scans you do, the more likely you are to pick up a barcode, but the longer it will take to scan.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I myseft use this code to recognize: Code 93, Code 128, EAN, UPC... You know: They're not belong to wide/narrow bar. Most of these barcodes don't start with "*" character. I have to archive accurate distance between bars. Maybe, that's why It's right in some cases. Would you like to give me some comment?
Anyway, thanks for your reply.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I've had this code in production for quite sometime now, what I have noticed is that if you scan just the portion of the image that the barcode should be in it increases your chances of reading the barcode. I have noticed some other barcode commerical barcode reading libraries that have an algorithmn to find the "region" in to which the barcode is located. I'm not sure how one would go about coding this but it would defiantly increase the percentage of successful barcode reads.
|
| Sign In·View Thread·PermaLink | 3.00/5 (2 votes) |
|
|
|
 |
|
 |
Hi,
Do you have C# code for generating barcode based on the format that will read it by your program?
If you have any idea, please pass it on to me..
Thanks in advance.
Regards M.Kumar
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
 |
Hi Kumar
Do generate Bar code, At very first we need to add reference..."barcodelib" And rest of the code goes like this (To generate and print)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.PointOfService; using System.IO;
namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void Form1_Load(object sender, EventArgs e) { }
private void button1_Click(object sender, EventArgs e) { pictureBox1.Image = null; BarcodeLib.Barcode b = new BarcodeLib.Barcode(textBox1.Text); b.EncodedType = BarcodeLib.TYPE.CODE39; Image barcode = b.Encode(); pictureBox1.Image = barcode; label1.Text = b.RawData; barcode.Save("C:\\Barcode.jpg"); //System.Drawing.Imaging.EncoderParameters encodeParams= new System.Drawing.Imaging.EncoderParameters(); //encodeParams.Param[0] = new System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder.ScanMethod, textBox1.Text); //printDialog1.ShowDialog(); // printDialog1.PrinterSettings.PrinterName="HP LaserJet P2015 Series PCL 5e"; // printDialog1.AllowSomePages = true;
// System.Drawing.Printing.PrintDocument doctoPrint = new System.Drawing.Printing.PrintDocument(); //printDialog1.Document = doctoPrint; //doctoPrint.Print(); }
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { System.Drawing.Font printFont = new System.Drawing.Font ("Arial", 35, System.Drawing.FontStyle.Regular);
// Draw the content. e.Graphics.DrawString("Hi", printFont, System.Drawing.Brushes.Black, 10, 10);
} } }
If u have idea about how to interface digital camera to our windows application...plz revert back Regards Kiran
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I justed wanted to let you know that I have successfully implemented this library and I have found that increasing the num of scans of the image greatly increases the success rate of finding a valid barcode. I also added a checksum function that makes certain that the code is valid.
Thanks, Curtis
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Could you post your improved source and demo here so everyone will benefit?
Thanks
We can't stop asking "WHY!!"
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I increased the number of scans that it did while doing a full path scan and I also added my own function in VB.net to check for the check sum digit. I have control of the barcode printing so I know that my barcodes use a check digit for accuracy.
Code:
ImgBar.FullScanPageCode39(AryCodes, bmpPage, 200)
#Region "CheckSum Code" Public Function CheckSum(ByVal Code As String) As Boolean Dim I As Integer Dim sum As Integer Dim SingleChar As String Dim ChkVal As Integer Dim ModChk As Integer Dim CodeEnd As Integer CodeEnd = Code.Length - 2 If CodeEnd > 0 Then For I = 0 To Code.Length - 2 SingleChar = Nothing ChkVal = 0 SingleChar = Code.Chars(I).ToString 'Get the value of the character ChkVal = CheckValAry(SingleChar) sum += ChkVal Next 'Get the last character Dim CheckChar As String Dim TrailingChkVal As Integer 'Get the last character of the barcode text CheckChar = Code.Chars(Code.Length - 1) TrailingChkVal = CheckValAry(CheckChar) 'The mod of the sum should equal the value of the check sum character ModChk = sum Mod 43 If ModChk = TrailingChkVal Then Return True Else Return False End If Else Return False End If End Function Public Function CheckValAry(ByVal pChar As Char) As Integer pChar = UCase(pChar) Dim AryChar() As Char = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%"} Return AryChar.IndexOf(AryChar, pChar) End Function #End Region
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
It appears that it is not very tolerant the barcodes being at an angle, does anyone have any suggestions as to how to improve this library to correct that?
Thanks, Curtis
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I'm trying to read the barcode using my barcodereader, but nothing happens. My reader makes an bib, so I guess it manage to read the code, but I would really like that to make the messagebox popup showing my barcode converted to alphanumeric...
Anyone know how to do that?
Thanks, Ole
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Yes, use the FullScanPageCode39 method and it will pass you back an array list of values that it found. You can look through that arrylist and display it back to the user in a messagebox if you like.
Curtis
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
 |
This code isn't realy intended for use with a barcode reader, and I'm really not sure if they are in any way compatable, as I don't have a reader to play with.
This topic was intended for finding barcodes in images, such as scanned pages.
Sorry that I can't be more helpful.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Yeah, this code is pretty much completely intolerant of angles, as it's meant for scanned documents... and if someone's scanning documents diagonally, they should be beaten severely.
I think that an angled reader would be a great deal more difficult to build, however if the number of scans were increased dramaticly (well above 50) then at least one of the scans should read a barcode as long as the angle isn't severe enough that no scan gets across the whole barcode.
Barcode scanners in Supermarkets have dozens of scan lines at differant angles to accomplish this.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I just want to know in barcode is usually start by * and end by * ... so can we aim in ArrayList if found string start with * and * is a content ?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
In my experience, most barcodes begin and end with *
However, I have also seen a model with a fixed number of characters, which is more difficult to parse out.
Also remember that there may be text on the same scan line as your barcode, so your result in the arraylist may be something like:
kjh4#u*SURPRISE*fvj
Still, it's pretty easy to parse out useful text from this.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
Here in codeproject is the code for deskewing an image. Search for "deskew" and have a look for that code. But deskewing takes a while in larger images. It makes sense to crop zones to shorten the process.
|
| Sign In·View Thread·PermaLink | 3.50/5 (3 votes) |
|
|
|
 |