ByteScout Barcode Suite - VBScript - Barcode image preprocessing filters with barcode reader sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Barcode Suite – VBScript – Barcode image preprocessing filters with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – VBScript – Barcode image preprocessing filters with barcode reader sdk

barcode image preprocessing filters with barcode reader sdk in VBScript with ByteScout Barcode Suite

Learn to code in VBScript to make barcode image preprocessing filters with barcode reader sdk with this simple How-To tutorial

The samples of source code documentation give a quick and simple method to apply a required functionality into your application. ByteScout Barcode Suite was made to help with barcode image preprocessing filters with barcode reader sdk in VBScript. ByteScout Barcode Suite is the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK.

The below SDK samples describe how to quickly make your application do barcode image preprocessing filters with barcode reader sdk in VBScript with the help of ByteScout Barcode Suite. If you want to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. Check these VBScript sample code examples to see if they acknowledge to your needs and requirements for the project.

Visit our website to get a free trial version of ByteScout Barcode Suite. Free trial contains many of source code samples to help you with your VBScript project.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

TestBarcodeReading.vbs
      
' This exmaple demonstrates the use of image filters to improve the decoding or speed. Dim result Set reader = CreateObject("Bytescout.BarCodeReader.Reader") reader.RegistrationName = "demo" reader.RegistrationKey = "demo" ' Set barcode type to find reader.BarcodeTypesToFind.Code128 = True ' WORKING WITH LOW CONTRAST BARCODE IMAGES ' Add the contrast adjustment for the low contrast image reader.ImagePreprocessingFilters.AddContrast(40) result = result & "Image ""low-contrast-barcode.png""" & vbCRLF reader.ReadFromFile "low-contrast-barcode.png" If reader.FoundCount = 0 Then result = result & "No barcode found!" & vbCRLF Else For i = 0 To reader.FoundCount - 1 result = result & "Found barcode with type " & CStr(reader.GetFoundBarcodeType(i)) & " and value """ & reader.GetFoundBarcodeValue(i) & """" & vbCRLF Next End If reader.ImagePreprocessingFilters.Clear() result = result & vbCRLF ' WORKING WITH NOISY BARCODE IMAGES ' Add the median filter to lower the noise reader.ImagePreprocessingFilters.AddMedian() result = result & "Image ""noisy-barcode.png""" & vbCRLF reader.ReadFromFile "noisy-barcode.png" If reader.FoundCount = 0 Then result = result & "No barcode found!" & vbCRLF Else For i = 0 To reader.FoundCount - 1 result = result & "Found barcode with type " & CStr(reader.GetFoundBarcodeType(i)) & " and value """ & reader.GetFoundBarcodeValue(i) & """" & vbCRLF Next End If reader.ImagePreprocessingFilters.Clear() result = result & vbCRLF ' WORKING WITH DENSE AND ILLEGIBLE BARCODES ' Add the scale filter to enlarge the barcode to make gaps between bars more distinguishable reader.ImagePreprocessingFilters.AddScale_2(2) ' enlarge twice result = result & "Image ""too-dense-barcode.png""" & vbCRLF reader.ReadFromFile "too-dense-barcode.png" If reader.FoundCount = 0 Then result = result & "No barcode found!" & vbCRLF Else For i = 0 To reader.FoundCount - 1 result = result & "Found barcode with type " & CStr(reader.GetFoundBarcodeType(i)) & " and value """ & reader.GetFoundBarcodeValue(i) & """" & vbCRLF Next End If reader.ImagePreprocessingFilters.Clear() result = result & vbCRLF ' REMOVE EMPTY MARGINS FROM IMAGE TO SPEED UP THE PROCESSING ' Add the crop filter to cut off empty margins from the image. ' This will not improve the recognition quality but may speed up the processing ' if you enabled multiple barcode types to search. reader.ImagePreprocessingFilters.AddCropDark() result = result & "Image ""barcode-with-large-margins.png""" & vbCRLF reader.ReadFromFile "barcode-with-large-margins.png" If reader.FoundCount = 0 Then result = result & "No barcode found!" & vbCRLF Else For i = 0 To reader.FoundCount - 1 result = result & "Found barcode with type " & CStr(reader.GetFoundBarcodeType(i)) & " and value """ & reader.GetFoundBarcodeValue(i) & """" & vbCRLF Next End If reader.ImagePreprocessingFilters.Clear() result = result & vbCRLF Msgbox result Set reader = Nothing

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next