Commit 88e2a6de 张士柳

1 个父辈 1352ebcf
...@@ -596,7 +596,7 @@ namespace eyemLib_Sharp ...@@ -596,7 +596,7 @@ namespace eyemLib_Sharp
//eyemCountObjectIrregularParts(ucpImage, file.Replace(".png", ""), 0d, "IP_LONG_PARTS", 100, 5, ref pNumObj, out tpDstImg); //eyemCountObjectIrregularParts(ucpImage, file.Replace(".png", ""), 0d, "IP_LONG_PARTS", 100, 5, ref pNumObj, out tpDstImg);
int ipNum; EyemBarCode* tpResults; int ipNum; EyemBarCode* tpResults;
DataCodeHandle hObject; DataCodeHandle hObject;
int iRes = eyemDetectAndDecode(ucpImage, tpRoi, file.Replace(".png", ""), "QR_CODE|DATA_MATRIX|CODE_128|CODE_39", out hObject, out tpResults, out ipNum, false, 11, 5, 128, 215, 1d); int iRes = eyemDetectAndDecode(ucpImage, tpRoi, file.Replace(".png", ""), "QR_CODE|DATA_MATRIX|CODE_128|CODE_39", out hObject, out tpResults, out ipNum, false, 21, 5, 128, 215, 1d);
for (int i = 0; i < ipNum; i++) for (int i = 0; i < ipNum; i++)
{ {
Console.WriteLine("类型:" + Marshal.PtrToStringAnsi(tpResults[i].hType) + ";坐标" + "[" + tpResults[i].iCenterX.ToString() + "," + tpResults[i].iCenterY.ToString() + "]" + ";角度:" + tpResults[i].dAngle.ToString("F4") + "," + ";内容:" + Marshal.PtrToStringAnsi(tpResults[i].hText) + ""); Console.WriteLine("类型:" + Marshal.PtrToStringAnsi(tpResults[i].hType) + ";坐标" + "[" + tpResults[i].iCenterX.ToString() + "," + tpResults[i].iCenterY.ToString() + "]" + ";角度:" + tpResults[i].dAngle.ToString("F4") + "," + ";内容:" + Marshal.PtrToStringAnsi(tpResults[i].hText) + "");
...@@ -658,7 +658,7 @@ namespace eyemLib_Sharp ...@@ -658,7 +658,7 @@ namespace eyemLib_Sharp
if (tpPoints == null) if (tpPoints == null)
throw new ArgumentNullException("cvPoint2D32f"); throw new ArgumentNullException("cvPoint2D32f");
//分配结构体需要的内存 //分配结构体需要的内存
IntPtr memory = (IntPtr)Marshal.AllocHGlobal(checked(Marshal.SizeOf(typeof(EyemOcsDXY)) * iLength)); IntPtr memory = Marshal.AllocHGlobal(checked(Marshal.SizeOf(typeof(EyemOcsDXY)) * iLength));
for (int index = 0; index < iLength; index++) for (int index = 0; index < iLength; index++)
{ {
Marshal.StructureToPtr(tpPoints[index], (IntPtr)(checked((long)memory + index * Marshal.SizeOf(typeof(EyemOcsDXY)))), false); Marshal.StructureToPtr(tpPoints[index], (IntPtr)(checked((long)memory + index * Marshal.SizeOf(typeof(EyemOcsDXY)))), false);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!