ClearImage .NET API
Find Method (CiBarcodePro)
Example 





Inlite.ClearImage Namespace > CiBarcodePro Class : Find Method
Maximum number of barcodes to read
Find multiple barcodes
Syntax
'Declaration
 
Public Function Find( _
   ByVal MaxBarcodes As System.Integer _
) As System.Integer
'Usage
 
Dim instance As CiBarcodePro
Dim MaxBarcodes As System.Integer
Dim value As System.Integer
 
value = instance.Find(MaxBarcodes)
public System.int Find( 
   System.int MaxBarcodes
)
public function Find( 
    MaxBarcodes: System.Integer
): System.Integer; 
public function Find( 
   MaxBarcodes : System.int
) : System.int;
public:
System.int Find( 
   System.int MaxBarcodes
) 

Parameters

MaxBarcodes
Maximum number of barcodes to read
Remarks

Method puts CiBarcode objects in object.Barcodes collection. 

MaxBarcodes set to 0 (zero) enables the detection of all the barcodes in the image.

See Barcode Reading code examples on Inlite's How-to Web Site

Example
void ReadBarcodes1D(string imageFile)
{
    // Create objects and open input images
    CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
    CiBarcodePro reader = ci.CreateBarcodePro();
    reader.Image.Open(imageFile, 1);
    // Configure reader
    reader.Type = FBarcodeType.cibfCode39 | FBarcodeType.cibfCode128;  // Select barcode types to read
    // reader.AutoDetect1D = true;  // Enable automatic detection of barcode type (Slower processing)
    // reader.Directions = FBarcodeDirections.cibHorz;   // Limit barcode search direction (Faster processing)
    reader.Find(0);
    foreach (CiBarcode Barcode in reader.Barcodes)
        Console.WriteLine(Barcode.Text);
}
Sub ReadBarcodes1D(imageFile As String)
    ' Create objects and open input images
    Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
    Dim Barcode As CiBarcode
    Dim reader As CiBarcodePro = ci.CreateBarcodePro()
    reader.Image.Open(imageFile, 1)
    ' Configure reader
    reader.Type = FBarcodeType.cibfCode39 + FBarcodeType.cibfCode128  ' Select barcode types to read
    ' reader.AutoDetect1D = True  ' Enable automatic detection of barcode type (Slower processing)
    ' reader.Directions = FBarcodeDirections.cibHorz   ' Limit barcode search direction (Faster processing)
    reader.Find(0)
    For Each Barcode In reader.Barcodes
        Console.WriteLine(Barcode.Text)
    Next
End Sub
See Also

Reference

CiBarcodePro Class
CiBarcodePro Members