ClearImage .NET API
Find Method (CiQR)
Example 





Inlite.ClearImage Namespace > CiQR 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 CiQR
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 ReadBarcodes2D(string imageFile)
{
    // Create objects and open input images
    CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
    CiPdf417 reader = ci.CreatePdf417();      // To read PDF416 barcodes
    // CiDataMatrix reader = ci.CreateDataMatrix();  // To read DataMatrix barcodes
    // CiQR reader = ci.CreateQR();          // To read QR barcodes
    reader.Image.Open(imageFile, 1);
    // Configure reader
    // reader.Directions = FBarcodeDirections.cibHorz;   // Limit barcode search direction (Faster processing)
    reader.Find(0);
    foreach (CiBarcode Barcode in reader.Barcodes)
        Console.WriteLine(Barcode.Text);
}
Sub ReadBarcodes2D(imageFile As String)
    ' Create objects and open input images
    Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
    Dim Barcode As CiBarcode, reader As Object
    reader = ci.CreatePdf417()      ' To read PDF416 barcodes
    ' reader = ci.CreateDataMatrix()  ' To read DataMatrix barcodes
    ' reader = ci.CreateQR()          ' To read QR barcodes
    reader.Image.Open(imageFile, 1)
    ' Configure reader
    ' 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

CiQR Class
CiQR Members