SetQuietZoneSize(BarcodeType,Single)
Moderator: Alex
-
- Posts: 4
- Joined: Tue Oct 10, 2023 12:38 pm
SetQuietZoneSize(BarcodeType,Single)
Please suggest how to use class SetQuietZoneSize(BarcodeType,Single) to change the size of Quiet zone. Please share small code or example if possible.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: SetQuietZoneSize(BarcodeType,Single)
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:
Best regards, Alexander
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);
-
- Posts: 4
- Joined: Tue Oct 10, 2023 12:38 pm
Re: SetQuietZoneSize(BarcodeType,Single)
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
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;
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: SetQuietZoneSize(BarcodeType,Single)
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
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
-
- Posts: 4
- Joined: Tue Oct 10, 2023 12:38 pm
Re: SetQuietZoneSize(BarcodeType,Single)
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
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
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: SetQuietZoneSize(BarcodeType,Single)
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
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
-
- Posts: 4
- Joined: Tue Oct 10, 2023 12:38 pm
Re: SetQuietZoneSize(BarcodeType,Single)
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);
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);