←Select platform

EnablePreprocessing Property

Summary

Enables applying auto segmentation and deep auto pre-processing to the image then re-scanning if no barcodes of this symbology are found.

Syntax
C#
VB
C++
public bool EnablePreprocessing { get; set; } 
Public Property EnablePreprocessing() As Boolean 
   Get 
   Set 
public:  
   property bool EnablePreprocessing 
   { 
      bool get() 
      void set(bool value) 
   } 

Property Value

true to apply auto segmentation and deep auto pre-processing to the image then re-scanning if no barcodes of this symbology are found; otherwise, false. The default value is false.

Remarks

When reading 2D barcodes, LEADTOOLS can perform internal auto preprocessing and segmentation on the image and try again if the engine cannot detect the barcode required. This may take extra processing and increase the barcode detection time. Therefore, it is best to set EnablePreprocessing to true only in certain situations, as follows:

  • The application is reading barcodes of this type exclusively (for example, a dedicated barcode reader is being used). In this case, reading the barcodes is always more important than recognition speed.

  • The application uses barcode detection on a server. Due to network latency, the time spent on the actual barcode detection is most probably less than the time required to send the image to the server and get the result back. Thus, it makes sense to enable pre-processing in this situation.

  • The images provided have a small resolution (DPI) or are known to come from a source that does not always provide clean images (for example, a Fax machine or a Scanner). Enabling pre-processing here ensures that the barcodes can be read regardless of the quality of the input image.

The LEADTOOLS .NET C# and VB Barcode demos leave pre-processing disabled by default. If the engine tries to read a barcode of this type but cannot find it, it will then ask the user if EnablePreprocessing should be enabled and reading be retried. An approach like that (or an automated one: Read. If failure, enable and read again) can also be used.

Example

For an example, refer to QRBarcodeReadOptions.

Requirements
Target Platforms
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Barcode Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.