datamatrix detection problem

622 views
Skip to first unread message

eda toper

unread,
Aug 4, 2022, 10:17:32 AM8/4/22
to zx...@googlegroups.com
Hello,
 I have a problem with scanning datamatrix. If i want to read the datamatrix, The data matrix should be in the middle of the image or I need to crop an area that the datamatrix is in from the image.
I just use zxing library. Is this a general problem?  Can you give me some advice about the problem?

I could never make it read without cropping the Datamatrix code like in the picture below.

Can you help me with this?

--


Eda Derya Toper
Image__2022-07-26__10-24-24.jpg

Sean Owen

unread,
Aug 4, 2022, 10:18:39 AM8/4/22
to zxing
Ideally crop to the region you know contains the barcode, to improve performance. It might find it from this image.
However, that Datamatrix code looks messed up, like it was encoded incorrectly or without a mask.

eda toper

unread,
Aug 5, 2022, 1:37:57 AM8/5/22
to Sean Owen, zxing

I have a general problem about datamatrix.  I have no problem with other barcodes (1d or qrcode) .
I only use the Zxing.net library. 

Other datamatrix images that cannot be decoded are as follows.  
I used these parameters as below👇   Am I missing something?


Options = new DecodingOptions
                {
                    TryHarder = true,
                    PureBarcode = false,                    
                    PossibleFormats = new List<BarcodeFormat> { BarcodeFormat.QR_CODE,                   
                    BarcodeFormat.CODE_39,
                    BarcodeFormat.CODE_93,
                    BarcodeFormat.CODE_128,
                    BarcodeFormat.CODABAR,                    
                    BarcodeFormat.PDF_417,                 
                    BarcodeFormat.DATA_MATRIX,
                    BarcodeFormat.MAXICODE,
                    }
ZXing.Result[] results = reader.DecodeMultiple(imgread.Bitmap);


1-okumadı.jpg
10-1-datamatrixokumadı.jpg


Sean Owen <sro...@gmail.com>, 4 Ağu 2022 Per, 17:18 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "zxing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zxing/e65f4a9f-8a50-4f62-bd63-56b1d061bce8n%40googlegroups.com.


--


Eda Derya Toper

Lachezar Dobrev

unread,
Aug 5, 2022, 6:49:18 AM8/5/22
to eda toper, Sean Owen, zxing
  The Data Matrix locator is a bit simplistic. The locator will *only* find matrices that are in the middle of the image. There also needs to be a significant white space around the matrix for it to be identified.
  This only applies to Data Matrices.

Farman Ali

unread,
Aug 5, 2022, 7:56:46 AM8/5/22
to zxing

Working on a web application which needs to scan the QR code from the device camera. In iOS its not possible to open the camera to scan the image. The alternative was was to upload a picture taken from the camera of the QR Code.

But the issue is the libraries which we are using to decrypt the QR code, does not recoganise the image uploaded since it has other information surrounding the QR code too. Just taking the image of QR code is not possible.

Is there a way where we can crop just the QR code part of the image ? or any library that can decrypt the QR code despite all other information in the image

eda toper

unread,
Aug 5, 2022, 9:41:23 AM8/5/22
to Farman Ali, zxing
I didn't have a problem decoding QRCode with the Zxing library. 
I created a desktop app with C#. And I can decode 1d and QRcode on the image and webcam. 
I had some problems with Datamatrix and sometimes PDF417.

Thank you everyone for your valuable information and advice. 

Farman Ali <farman...@gmail.com>, 5 Ağu 2022 Cum, 14:56 tarihinde şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "zxing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.


--


Eda Derya Toper
Reply all
Reply to author
Forward
0 new messages