Page 1 of 1

SetQuietZoneSize(BarcodeType,Single)

Posted: Wed Oct 11, 2023 9:13 am
by rohitchavan
Please suggest how to use class SetQuietZoneSize(BarcodeType,Single) to change the size of Quiet zone. Please share small code or example if possible.

Re: SetQuietZoneSize(BarcodeType,Single)

Posted: Wed Oct 11, 2023 12:34 pm
by Alex
Hello,

The barcode reader can test the quality of barcode print using the ISO 15415 barcode print quality test.

The ISO 15415 barcode print quality test uses different quiet zones for different barcode types as specified in specifications of barcode types.

Here is C# code that demonstrates how to change the allowable quiet zone for DataMatrix barcodes when recognized barcodes are tested using the ISO 15415 barcode print quality test:

Code: Select all

barcodeReader.ISO15415QualityTestSettings = new Vintasoft.Barcode.QualityTests.ISO15415QualityTestSettings();
barcodeReader.ISO15415QualityTestSettings.SetQuietZoneSize(BarcodeType.DataMatrix, 1);
Best regards, Alexander

Re: SetQuietZoneSize(BarcodeType,Single)

Posted: Thu Oct 12, 2023 11:19 am
by rohitchavan
Hi, Alexander thanks for your reply.

While using reader.ISO15415QualityTestSettings.SetQuietZoneSize(BarcodeType.DataMatrix, 1)) function, we get error at this line. Error : System.NullReferenceException: 'Object reference not set to an instance of an object.'

Following is my some line of code

Code: Select all

BarcodeReader reader = new BarcodeReader();
reader.Settings.ScanBarcodeTypes = BarcodeType.DataMatrix;
reader.Settings.ImageScaleFactor = 1f;
reader.Settings.ScanInterval = Convert.ToInt32(txtAdvanceParam.Text);
reader.Settings.ExpectedBarcodes = 1;
reader.Settings.SearchDistortedDataMatrixBarcodes = true;  
reader.Settings.SearchDistortedQRBarcodes = true;

reader.ISO15415QualityTestSettings.SetQuietZoneSize(BarcodeType.DataMatrix, 1); ////  error at this line
reader.Settings.RecognitionTimeout = 500;
reader.Settings.AutomaticRecognition = true;

Re: SetQuietZoneSize(BarcodeType,Single)

Posted: Thu Oct 12, 2023 4:36 pm
by Alex
Hello,

I updated my code in previous post. For solving the problem you need to initialize the barcodeReader.ISO15415QualityTestSettings property by instance of ISO15415QualityTestSettings class.

Best regards, Alexander

Re: SetQuietZoneSize(BarcodeType,Single)

Posted: Fri Oct 13, 2023 1:27 pm
by rohitchavan
Hi,
I used your suggested code in our application, but SetQuietZoneSize not working in my code. Might be I make some mistakes. Please share complete sample code in C# with SetQuietZoneSize function. For reading datamatrix using image, and read quiet zone grade and value.

I apology for any inconvenience caused by sending same query.
Thanks,
Rohit

Re: SetQuietZoneSize(BarcodeType,Single)

Posted: Fri Oct 13, 2023 2:21 pm
by Alex
Hi Rohit,

Please send (to support@vintasoft.com) a small console project, which allows to reproduce your problem. We need to reproduce your problem on our side.

Best regards, Alexander

Re: SetQuietZoneSize(BarcodeType,Single)

Posted: Sat Oct 14, 2023 11:37 am
by rohitchavan
Hi Alex,
Thanks for your suggestion, I make some changes in my code. Now its working as per our requirement.
BarcodeReader reader = new BarcodeReader();
reader.Settings.ScanBarcodeTypes = BarcodeType.DataMatrix;
reader.Settings.ImageScaleFactor = 1f;
reader.Settings.ScanInterval = Convert.ToInt32(txtAdvanceParam.Text);
reader.Settings.ExpectedBarcodes = 1;

// modified code // :-)
:)
reader.ISO15415QualityTestSettings = new Vintasoft.Barcode.QualityTests.ISO15415QualityTestSettings();
reader.ISO15415QualityTestSettings.SetQuietZoneSize(BarcodeType.DataMatrix, 2);