# ShapeMatchDLL **Repository Path**: doiob/shape-match-dll ## Basic Information - **Project Name**: ShapeMatchDLL - **Description**: ShapeMatch DLL - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-20 - **Last Updated**: 2026-04-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ShapeMach项目(Python + DLL) > 基于shape_based_matching这个仓库,使用python实现一个DLL项目shapematch.dll,要求如下: > > - shapematch.dll供Win7 x86 + VC2010项目调用 > - 用Nuitka把python的DLL项目打包成shapematch.dll > - 提供详细完整的python项目,包括目录、代码、环境依赖(在虚拟环境中) > - DLL项目包含功能和调用接口: > -- init()/free() > -- loadtemplate(const char* name) > -- addTemplate(CMat:: in,CRect& rect) > -- deleteTemplate(int id_template) > -- showTemplate(HDC& pdc) > -- match(int id_template, float& 0x, float& oy, float& score, float& oscale, float& angle, float& delay) 一、环境部署 1. 相关软件工具 1. 操作系统:Win7 x86(需在 Win7 32 位环境编译,或 Win10 32 位兼容模式) 2. Python 版本:python 3.8(32 位,Nuitka 对 3.8 兼容性最佳,且支持 Win7) 3. 编译器:VC2010(需配置 `vcvarsall.bat` 环境) 4. 依赖库: 1. OpenCV-Python 4.5.5.62(32 位,最后支持 Win7 的版本) 2. Nuitka 1.6.6(32 位,兼容 Python 3.8 + Win7) 3. numpy 1.23.5(32 位,适配 Python 3.8 + Win7) 2. python虚拟环境 安装python,并在当前项目目录启动终端窗口,执行命令: ```shell python -m venv .venv .venv\Scripts\activate # 激活虚拟环境 ``` 3. 安装依赖(requirements.txt) 首先,创建requirements.txt ``` numpy==1.23.5 opencv-python==4.5.5.62 nuitka==1.6.6 setuptools==65.5.0 # 适配Nuitka wheel==0.38.4 ``` 然后,在终端执行: ```powershell pip install -r requirements.txt ``` 4. d 二、项目结构 三、实现源码 - shapematch.dll供Win7 x86 + VC2010项目调用 - 用Nuitka把python的DLL项目打包成shapematch.dll - 提供详细完整的python项目,包括目录、代码、环境依赖(在虚拟环境中) - DLL项目包含功能和调用接口: -- init()/free() -- loadtemplate(const char* name) -- addTemplate(CMat:: in,CRect& rect) -- deleteTemplate(int id_template) -- showTemplate(HDC& pdc) -- match(int id_template, float& 0x, float& oy, float& score, float& oscale, float& angle, float& delay)