SetQuietZoneSize(BarcodeType,Single)

Questions, comments and suggestions concerning VintaSoft Barcode .NET SDK.

Moderator: Alex

Post Reply
rohitchavan
Posts: 4
Joined: Tue Oct 10, 2023 12:38 pm

SetQuietZoneSize(BarcodeType,Single)

Post 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.
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: SetQuietZoneSize(BarcodeType,Single)

Post 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
rohitchavan
Posts: 4
Joined: Tue Oct 10, 2023 12:38 pm

Re: SetQuietZoneSize(BarcodeType,Single)

Post 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;
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: SetQuietZoneSize(BarcodeType,Single)

Post 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
rohitchavan
Posts: 4
Joined: Tue Oct 10, 2023 12:38 pm

Re: SetQuietZoneSize(BarcodeType,Single)

Post 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
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: SetQuietZoneSize(BarcodeType,Single)

Post 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
rohitchavan
Posts: 4
Joined: Tue Oct 10, 2023 12:38 pm

Re: SetQuietZoneSize(BarcodeType,Single)

Post 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);
Post Reply