SDKs.DjiImage
1.7.0
dotnet add package SDKs.DjiImage --version 1.7.0
NuGet\Install-Package SDKs.DjiImage -Version 1.7.0
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="SDKs.DjiImage" Version="1.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SDKs.DjiImage" Version="1.7.0" />
<PackageReference Include="SDKs.DjiImage" />
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 SDKs.DjiImage --version 1.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SDKs.DjiImage, 1.7.0"
#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.
#addin nuget:?package=SDKs.DjiImage&version=1.7.0
#tool nuget:?package=SDKs.DjiImage&version=1.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SDKs.DjiImage
https://github.com/Jazous/SDKs-DjiImage
1、Nuget 安装
.NET 6.0及以上
PM> Install-Package SDKs.DjiImage
.NET Framework 4.8
PM> Install-Package SDKs.DjiImage.Net48
.NET Framework 4.5.2
PM> Install-Package SDKs.DjiImage.Net45
2、下载 DJI TSDK 添加到项目中
https://www.dji.com/cn/downloads/softwares/dji-thermal-sdk
dji_thermal_sdk_v1.7_20241205.zip
下载后解压,并将对应 tsdk-core\lib
目录下的 libv_list.ini
、*.dll
和 *.so
文件拷贝到执行程序根目录下
3、使用例子
byte[] data = System.IO.File.ReadAllBytes("img/H30T.JPG");
using (var rjpg = RJPEG.TryParse(data))
{
if (rjpg != null)
{
//获取整张图片的最高温、最低温和平均温度
Console.WriteLine($"rjpeg:MinTemp={rjpg.MinTemp} ,MaxTemp={rjpg.MaxTemp} ,AvgTemp={rjpg.AvgTemp}");
//获取指定矩形范围内的最高温、最低温和平均温度
var rect = rjpg.GetRect(100, 100, 200, 200);
Console.WriteLine($"rect:MinTemp={rect.MinTemp} ,MaxTemp={rect.MaxTemp} ,AvgTemp={rect.AvgTemp}");
//设置调色板风格
rjpg.SetPseudoColor(PseudoColor.DIRP_PSEUDO_COLOR_IRONRED);
//设置亮度
rjpg.SetBrightness(60);
//保存设置温宽后的伪彩色照片
using (var fs = System.IO.File.OpenWrite("H30T_adjust.JPG"))
{
rjpg.SaveTo(fs, rjpg.MaxTemp - 2, rjpg.MaxTemp);
fs.Flush();
}
}
}
注:运行报错 System.BadImageFormatException
时,需要项目属性设置相应的目标平台, release_x64
目标平台选择 x64
,release_x86
目标平台选择 x86
(.NET Framework
中 AnyCPU
默认是 x86
)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- SkiaSharp (>= 2.88.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1、添加调整温度色度条功能;2、添加根据温度设置颜色功能。