Maxicode decoding issue
I attached two maxicodes, the maxicode decods perfectly fine if it is a PURE BARCODE, but as soon as I put anything else on the image it can no longer recognize.
I tested this out with numerous lables.
The maxicode should decode to : teststestes Demo
The below code decodes with no issues at all, it's only when I remove the PureBarcode flag are issues caused. So since test2.png has other things in the image besides just a barcode, it is impossible to decode from what I can see using the library?
Private Sub decode() Try Me.PictureBox1.Image = System.Drawing.Bitmap.FromFile("test.png") Dim x As New MessagingToolkit.Barcode.BarcodeDecoder() Dim doc As New System.Collections.Generic.Dictionary(Of MessagingToolkit.Barcode.DecodeOptions, Object) Dim bc As New System.Collections.Generic.List(Of Barcode.BarcodeFormat) bc.Add(Barcode.BarcodeFormat.MaxiCode) 'doc.Add(MessagingToolkit.Barcode.DecodeOptions.Other, False) doc.Add(MessagingToolkit.Barcode.DecodeOptions.PureBarcode, True) doc.Add(MessagingToolkit.Barcode.DecodeOptions.TryHarder, True) doc.Add(MessagingToolkit.Barcode.DecodeOptions.PossibleFormats, bc) Dim res As Barcode.Result = x.Decode(Me.PictureBox1.Image, doc) MsgBox(res.Text) end sub
Now changing the purebarcode to off makes it not decode on either attached image, so basically test2.png, even though it is a good barcode will not decode with any settings for maxicode. Can you see why test2.png can not be decoded with the library?
RE: Maxicode decoding issue - Added by admin almost 8 years ago
The current version only supports synthetic image for Maxicode, meaning there is no error correction ,etc.
That is the reason that the Pure Barcode option must be in order for the decoder to work.
If the option is not set, then the decoder skips Maxicode decoding.
We are working on the detector portion for Maxicode and should be available in the next release.