日期:2014-05-18 浏览次数:21018 次
[ StructLayout( LayoutKind.Sequential, CharSet=CharSet.Ansi )]
public struct RECT{
  public int left; 
  public int top; 
  public int right; 
  public int bottom; 
}
[ StructLayout( LayoutKind.Sequential, CharSet=CharSet.Ansi )]
public struct TH_PlateIDResult{
   [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
   public string license;
   [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
   public string color;
   public int nColor; // 车牌颜色
   public int nType; // 车牌类型
   public int nConfidence; // 整牌可信度
   public int int nBright; // 亮度评价
   public int int nDirection; //车牌运动方向,0 unknown, 1 left, 2 right, 3 up , 4 down
   public RECT rcLocation;
   public IntPtr pbyBits;
   public int nTime;
   public  byte nCarBright; //车的亮度
   public  byte nCarColor; //车的颜色
   [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
   public  string reserved; // 保留
}
  [ DllImport( "test.dll" ,CharSet = CharSet.Ansi,CallingConvention=CallingConvention.StdCall)]
  public static extern int TH_RecogImage(IntPtr pbyBits, int nWidth, int nHeight, ref TH_PlateIDResult  pResult,ref int nResultNum, ref RECT prcRange, ref TH_PlateIDCfg pPlateConfig);