From 88fc0f9f9b7fd3eb81c958ca41ed822cf3657c47 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期二, 22 四月 2025 15:50:22 +0800
Subject: [PATCH] refactor: 重构中药识别项目 分为onnx版和openvino版

---
 onnx/cam_util.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/cam_util.py b/onnx/cam_util.py
similarity index 78%
rename from cam_util.py
rename to onnx/cam_util.py
index c511c6d..f4fde60 100644
--- a/cam_util.py
+++ b/onnx/cam_util.py
@@ -22,14 +22,23 @@
         for device in webcams:
             name = getattr(device, 'Name', None)
             pnp_class = getattr(device, 'PNPClass', None)
+            if pnp_class == 'Camera':
+                # 灏嗚澶囧悕瀛楀拰绱㈠紩娣诲姞鍒板瓧鍏镐腑
+                print(f"{name},{pnp_class}")
             if name is not None and self.cam1 in name:
+
                 # 灏嗚澶囧悕瀛楀拰绱㈠紩娣诲姞鍒板瓧鍏镐腑
                 webcam_dict[self.cam1] = index
                 index += 1
             elif name is not None and self.cam2 in name:
+
                 # 灏嗚澶囧悕瀛楀拰绱㈠紩娣诲姞鍒板瓧鍏镐腑
                 webcam_dict[self.cam2] = index
                 index += 1
             self.webcam_list = webcam_dict
 
+        print(webcam_dict)
+        # 鎸夊悕绉伴噸鏂版帓搴�
+        webcam_dict = dict(sorted(webcam_dict.items(), key=lambda x: x[0]))
+        print(webcam_dict)
         return webcam_dict
\ No newline at end of file

--
Gitblit v1.9.3