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

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

    每个条码结果包含以下的属性参数:

    Barcode value

    Barcode type

    Confidence

    Location

    Skew

>>>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  

转载于:https://my.oschina.net/u/913380/blog/167422

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值