From 747d110897a5b6db6335fb85c1465bfe8f40a983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E7=8E=AE?= Date: Fri, 22 Nov 2024 15:54:57 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81image=20framework?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/image_framework.py | 3 ++- req.txt | 3 +-- util/imgProcess.py | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 util/imgProcess.py diff --git a/components/image_framework.py b/components/image_framework.py index edeb3bb..82ec45c 100644 --- a/components/image_framework.py +++ b/components/image_framework.py @@ -10,7 +10,7 @@ import time import cv2 from core.edge_component import action, EdgeComponent, service -from util import get_system_and_library_suffix +from util import get_system_and_library_suffix, imgProcess # 给回调函数使用 @@ -354,4 +354,5 @@ class ImageFramework(EdgeComponent): if msg.msg_type == MSG_LOCATION_RECORD: # cv2.imshow("LOCATION", msg.im2D) # cv2.waitKey(1) + msg = imgProcess.process(msg) self.signals.on_image_detect_result.emit(msg) diff --git a/req.txt b/req.txt index 4746cb4..6141723 100644 --- a/req.txt +++ b/req.txt @@ -8,5 +8,4 @@ paho-mqtt==2.1.0 dynaconf==3.2.5 fastapi==0.111.0 uvicorn==0.30.1 -SQLAlchemy==2.0.34 -opencv-python==4.10.0.84 \ No newline at end of file +SQLAlchemy==2.0.34 \ No newline at end of file diff --git a/util/imgProcess.py b/util/imgProcess.py new file mode 100644 index 0000000..549721f --- /dev/null +++ b/util/imgProcess.py @@ -0,0 +1,14 @@ +import os +import threading +from ctypes import * +import numpy as np +from PyQt5.QtCore import QObject, pyqtSignal +from dynaconf.base import Settings +from numpy.ctypeslib import as_array +import platform +import time +import cv2 +import imgProcess + +def process(msg): + return msg \ No newline at end of file