TianWeiToolsPro.Vision 3.2.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package TianWeiToolsPro.Vision --version 3.2.4
                    
NuGet\Install-Package TianWeiToolsPro.Vision -Version 3.2.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TianWeiToolsPro.Vision" Version="3.2.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TianWeiToolsPro.Vision" Version="3.2.4" />
                    
Directory.Packages.props
<PackageReference Include="TianWeiToolsPro.Vision" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TianWeiToolsPro.Vision --version 3.2.4
                    
#r "nuget: TianWeiToolsPro.Vision, 3.2.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TianWeiToolsPro.Vision@3.2.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TianWeiToolsPro.Vision&version=3.2.4
                    
Install as a Cake Addin
#tool nuget:?package=TianWeiToolsPro.Vision&version=3.2.4
                    
Install as a Cake Tool

TianWeiToolsPro.Vision

Windows x64 视觉算法与窗口显示库。程序集、NuGet 包和公开命名空间均为 TianWeiToolsPro.Vision,公开类型以 Tv 开头。公司 TianWei.net,作者 LaiTianWei。

支持 .NET Framework 4.7.2、.NET Framework 4.8、.NET 6、.NET 8 和 .NET 10。窗口控件面向 WPF。以上目标均仅适用于 Windows x64,不支持 Linux、macOS 或 x86;使用程序也应以 x64 运行。

包版本 3.2.3;托管程序集版本为 19.5.0.0,原生文件版本为 3.2.3,算法来源为 HALCON 19.05。

功能

调用入口是 TvOperatorSet 和各领域类型。参数与结果多用 TvTuple、TvObject 及其派生对象,用完后应释放。

模块 能力
图像与区域 图像、区域、轮廓/多边形(XLD)、颜色查找表
几何 二维/三维齐次变换、位姿、四元数、矩阵
匹配定位 形状模板、NCC、可变形模板、三维形状与表面、组件模型
标定与三维 相机参数、标定数据、相机布置、立体、结构光、光切
识别 一维码、二维码、OCR(Box/CNN/KNN/MLP/SVM)、文本模型、样本标识
分类与学习 盒分类、GMM、KNN、LUT、MLP、SVM、特征集、深度学习分类器与模型
检测测量 卡尺测量、计量模型、纹理检测、变化模型、背景估计、胶路检测
设备 采集卡、文件、串口、套接字、IO 设备与通道、计算设备
显示 缓冲窗口、WPF 智能窗口与基础窗口、可绘制对象、三维场景
运行时 元组、句柄、字典、线程、事件、消息队列、互斥与屏障

WPF 显示使用 TvSmartWindowControlWPF(缩放、拖动、绘图对象)或 TvWindowControlWPF(基础窗口)。不提供 WinForms 控件。

构建与打包

dotnet build .\TianWeiToolsPro.Vision\TianWeiToolsPro.Vision.csproj --restore -c Debug -p:Platform=x64 -m:1
dotnet pack .\TianWeiToolsPro.Vision\TianWeiToolsPro.Vision.csproj --no-build -c Debug -p:Platform=x64

构建生成多目标框架的本地 NuGet 包,不自动上传源。普通构建使用项目内 Native/x64 的两个文件:

  • TwVision.dll:原生算法库
  • TwCanvas.dll:窗口显示组件;缺少它时窗口无法初始化

项目引用时,这两个文件会复制到输出目录。NuGet 包将它们放在 runtimes/win-x64/native,并用 build / buildTransitive 复制规则带到程序根目录,覆盖直接引用、传递引用和 .NET Framework。哈希记在 Native/runtime-manifest.json;打包前两个文件必须存在且与清单一致,否则中止打包。

调用与验证

using TianWeiToolsPro.Vision;

TvOperatorSet.GetSystem("version", out TvTuple version);
using (version)
{
    Console.WriteLine(version.S);
}

独立验证程序只在开发电脑上检查接口、图像、匹配、坐标换算和 WPF 窗口生命周期,不接控制卡或真实相机:

dotnet build .\TianWeiToolsPro.Vision.Verification\TianWeiToolsPro.Vision.Verification.csproj --restore -c Debug -p:Platform=x64 -m:1
.\scripts\Invoke-VisionVerification.ps1 -Executable '.\TianWeiToolsPro.Vision.Verification\bin\x64\Debug\net10.0-windows\TianWeiToolsPro.Vision.Verification.exe' -RecordPrefix '.\outputs\vision-check'

当前 14 项检查覆盖公开接口、原生版本、图像和元组、NCC/形状匹配、九点仿射坐标换算,以及 WPF 窗口显示、缩放、调整大小、释放和重新打开。接口基线为 136 个公开类型、9428 条声明,命名空间须为 TianWeiToolsPro.Vision,顶层公开类型以 Tv 开头。退出码、唯一完成记录及全部逐项结果均须通过;记录前缀不可覆盖既有结果。

这些检查不能代替真实相机标定、生产电脑运行、实机精度或长时间稳定性验收。

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net10.0-windows7.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TianWeiToolsPro.Vision:

Package Downloads
TianWeiToolsPro.UI.Drawing

WPF图像显示、交互绘图、ROI编辑与坐标标尺控件库。

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.2.6 109 11/2/2026
3.2.4 110 10/31/2026
3.2.3 109 10/27/2026