VintaSoft Barcode .NET SDK Discussions

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

Board index < VintaSoft Barcode < VintaSoft Barcode .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

SetQuietZoneSize(BarcodeType,Single)



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.


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:
barcodeReader.ISO15415QualityTestSettings = new Vintasoft.Barcode.QualityTests.ISO15415QualityTestSettings();
barcodeReader.ISO15415QualityTestSettings.SetQuietZoneSize(BarcodeType.DataMatrix, 1);
Best regards, Alexander


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
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)

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


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


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


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


Page 1 from 1: 1