From d0ded5cd9bf5070a120bad58b5be21fe2ac6a4ff Mon Sep 17 00:00:00 2001
From: C3032 <C3032@BC3032>
Date: 星期六, 20 十二月 2025 16:41:09 +0800
Subject: [PATCH] test

---
 IDViewer_2D/IDViewerSDK2.cs |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/IDViewer_2D/IDViewerSDK2.cs b/IDViewer_2D/IDViewerSDK2.cs
new file mode 100644
index 0000000..1e5f826
--- /dev/null
+++ b/IDViewer_2D/IDViewerSDK2.cs
@@ -0,0 +1,54 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using static SmartScanner.IDViewerDefines;
+using System.IO;
+using System.Drawing;
+
+namespace SmartScanner
+{
+    class IDViewerSDK2
+    {
+        [DllImport("yolov8_ov_infer.dll", EntryPoint = "CreateDetector_CPU", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr CreateDetector_CPU();
+
+        [DllImport("yolov8_ov_infer.dll", EntryPoint = "InitializeDetector_CPU", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern bool InitializeDetector_CPU(IntPtr m_yolov8, string device_char, string model_path_char);
+        [DllImport("yolov8_ov_infer.dll", EntryPoint = "PredictDetector_CPU", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern void PredictDetector_CPU(IntPtr m_yolov8,
+            byte[] image_batch,
+            float[] x1_ptr,
+            float[] y1_ptr,
+            float[] x2_ptr,
+            float[] y2_ptr,
+            float[] prob_ptr,
+            int[] class_ptr,
+            int[] num_boxes,
+            int buffer_size,
+            int width,
+            int height,
+            int batch_size,
+            float conf_thresh,
+            float nms_thres,
+            int is_Saved,
+            int sequence);
+
+        [DllImport("yolov8_ov_infer.dll", EntryPoint = "DisposeDetector_CPU", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern void DisposeDetector_CPU(IntPtr m_yolov8);
+
+        [DllImport("yolov8_ov_infer.dll", EntryPoint = "ConvertSingletoThreeChannels", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern void ConvertSingletoThreeChannels(IntPtr m_yolov8, byte[] input, int width, int height, byte[] output);
+
+
+        //OPT鎻愪緵鐨凜++SDK
+        [DllImport("optSDK.dll", EntryPoint = "IDImage_Create", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern IntPtr IDImage_Create();
+        [DllImport("IDViewerSDK.dll", EntryPoint = "IDImage", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern long IDImage(byte[] srcImageData, int step, int rows, int cols, int channel, IDImageType depth);
+        [DllImport("IDViewerSDK.dll", EntryPoint = "captureImage", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
+        public static extern long captureImage(IntPtr image);
+    }
+}

--
Gitblit v1.9.3