条码控件Barcode Xpress如何得到条码检测结果

条码控件 Barcode Xpress提供了 条码检测和条码建立的的功能,使用Barcode Xpress将会更加轻松的添加优秀的条码功能到Windows应用程序中。Barcode Xpress支持一系列的1D和2D的条形码,并能够在图像中自动检测全部的条码,还会对检测的全部的条码返回一个详细的且完善的检测结果。

    每一个条码结果包含如下的属性参数: ide

    Barcode value spa

    Barcode type code

    Confidence 排序

    Location get

    Skew io

>>>Barcode Xpress 下载 下载

    因为Barcode Xpress能够从一个单一的扫描中返回多个条码结果,检测的条码结果均可以按照下面的标准来进行存储,可是须要注意的是全部解决了的条码将会排在没有解决的条码以前。 程序

    1. Confidence因素是决定条码结果排序的条件,通常是从高往低排列。Confidence属性将会得到已经识别过的条码的Confidence。
    2. 下面,对于有着相同的Confidence的任意条码,将会从上到下,而后从左往右的经过位置来进行排序。

  1. Sort the results top to bottom  
  2.         Dim BarcodeArray() As BarcodeInfo  
  3.         Redim BarcodeArray(0 To BarcodeXpress1.NumBarcodes - 1)  
  4.         ' fill the user type array  
  5.         For i = 0 To BarcodeXpress1.NumBarcodes - 1  
  6.             BarcodeXpress1.GetBarcode i  
  7.             BarcodeArray(i).CodeName = BarcodeXpress1.BarcodeCodeName  
  8.             BarcodeArray(i).result = BarcodeXpress1.BarcodeResult  
  9.             BarcodeArray(i).CheckSumOK = BarcodeXpress1.CheckSumOK  
  10.             BarcodeArray(i).Confidence = BarcodeXpress1.Confidence  
  11.             BarcodeArray(i).Length = BarcodeXpress1.ResultLen  
  12.             BarcodeArray(i).X = BarcodeXpress1.BarcodeX  
  13.             BarcodeArray(i).Y = BarcodeXpress1.BarcodeY  
  14.             BarcodeArray(i).H = BarcodeXpress1.BarcodeH  
  15.             BarcodeArray(i).W = BarcodeXpress1.BarcodeW  
  16.         Next i  
  17.         ' actual sort results top to bottom  
  18.         Dim temp As BarcodeInfo  
  19.         For i = Ubound(BarcodeArray) - 1 To 0 Step -1  
  20.             For j = 0 To i  
  21.                 If BarcodeArray(j).Y > BarcodeArray(j + 1).Y Then  
  22.                     temp = BarcodeArray(j + 1)  
  23.                     BarcodeArray(j + 1) = BarcodeArray(j)  
  24.                     BarcodeArray(j) = temp  
  25.                 End If  
  26.             Next  
  27.         Next
相关文章
相关标签/搜索