Skip to content

Commit f598515

Browse files
committed
fixes issue with AzureKinectPlayer for orbbec not showing the ColorImage output
1 parent cd6c9e4 commit f598515

7 files changed

Lines changed: 75 additions & 9 deletions

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
- name: Publish OrbbecFemto Nuget
2727
uses: vvvv/PublishVLNuget@1.0.44
2828
with:
29-
csproj: src\VL.Devices.AzureKinect.csproj
29+
csproj: src\VL.Devices.AzureKinect.Femto.csproj
3030
nuspec: deployment\VL.Devices.AzureKinect.Femto.nuspec
3131
icon-src: https://raw.githubusercontent.com/vvvv/PublicContent/master/nugeticon.png
3232
icon-dst: ./deployment/nugeticon.png
3333
nuget-key: ${{ secrets.VVVV_ORG_NUGET_KEY }}
3434

3535
- name: Publish AzureKinect Nuget
36-
uses: vvvv/PublishVLNuget@1.0.43
36+
uses: vvvv/PublishVLNuget@1.0.44
3737
with:
3838
csproj: src\VL.Devices.AzureKinect.csproj
3939
nuspec: deployment\VL.Devices.AzureKinect.nuspec

VL.Devices.AzureKinect.vl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7186,7 +7186,7 @@
71867186
</Node>
71877187
</Patch>
71887188
</Node>
7189-
<Node Bounds="100,15,235,292" Id="Bj0WfEUDBcRPekigt6jTL5">
7189+
<Node Bounds="100,15,271,292" Id="Bj0WfEUDBcRPekigt6jTL5">
71907190
<p:NodeReference LastCategoryFullName="System.Resources" LastDependency="VL.CoreLib.vl">
71917191
<CategoryReference Kind="Category" Name="Resources" />
71927192
<Choice Kind="OperationCallFlag" Name="New" />
@@ -7274,6 +7274,13 @@
72747274
<Pin Id="KXq03Fhx480PnfHPexDaO2" Name="Input 2" Kind="InputPin" />
72757275
<Pin Id="Ftc20FKSbWSNK8fXIepOqc" Name="Output" Kind="OutputPin" />
72767276
</Node>
7277+
<Node Bounds="307,230,52,19" Id="A1aKfDIwj3QOILZivFkndF">
7278+
<p:NodeReference LastCategoryFullName="VL.Devices.AzureKinect.KinectImageExtensions" LastDependency="VL.Devices.AzureKinect.dll">
7279+
<Choice Kind="NodeFlag" Name="Node" Fixed="true" />
7280+
<Choice Kind="OperationCallFlag" Name="IsFemto" />
7281+
</p:NodeReference>
7282+
<Pin Id="SJmRos64VpjMFI1cymBv7D" Name="Is Femto" Kind="OutputPin" />
7283+
</Node>
72777284
</Patch>
72787285
</Node>
72797286
<Node Bounds="100,323,83,26" Id="SYRtpFJhcZkNw1XQYO1mrq">
@@ -10080,6 +10087,7 @@
1008010087
<Link Id="THQS4iWDRQYMNv11mBIdyr" Ids="VTwVrIrnXmFPWi2wlWzoKA,KmsWYq0XanhLLJ0EYZu3ul" />
1008110088
<Link Id="Uiz4BDv5jPWN8hejjSIKaH" Ids="PFG08r5ESo4OObdXHArxVz,IUfd6wbCKe8P6RtBlJozHw" />
1008210089
<Link Id="J2mcD2iYC1EPMZEOETqJt3" Ids="VTwVrIrnXmFPWi2wlWzoKA,TXJ1bEP56WlLPrQuwKGIsZ" />
10090+
<Link Id="Iw9LZgFycN4OvEbpNY5e4T" Ids="SJmRos64VpjMFI1cymBv7D,BOA6OhnuIkSPxQSh1f63dp" />
1008310091
</Patch>
1008410092
</Node>
1008510093
<Canvas Id="Cn5O2ZnLNfVNo2T5gYsRkM" Name="BodyTracking" Position="322,469" CanvasType="Group">

deployment/VL.Devices.AzureKinect.Femto.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
33
<metadata>
44
<id>VL.Devices.AzureKinect.Femto</id>
5-
<version>1.7.2</version>
5+
<version>1.8.0</version>
66
<title>VL.Devices.AzureKinect.Femto</title>
77
<authors>vvvv</authors>
88
<projectUrl>https://github.com/vvvv/VL.Devices.AzureKinect</projectUrl>

deployment/VL.Devices.AzureKinect.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
33
<metadata>
44
<id>VL.Devices.AzureKinect</id>
5-
<version>1.9.2</version>
5+
<version>1.9.3</version>
66
<title>VL.Devices.AzureKinect</title>
77
<authors>vvvv</authors>
88
<projectUrl>https://github.com/vvvv/VL.Devices.AzureKinect</projectUrl>

src/KinectImageExtensions.cs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using Microsoft.Azure.Kinect.Sensor;
2+
using Stride.Core.Mathematics;
23
using System;
34
using System.Reactive.Linq;
45
using VL.Lib.Basics.Imaging;
56
using VL.Lib.Collections;
6-
using Stride.Core.Mathematics;
77

88
namespace VL.Devices.AzureKinect
99
{
@@ -16,6 +16,18 @@ struct XYZ
1616
public short z;
1717
}
1818

19+
public static bool IsFemto
20+
{
21+
get
22+
{
23+
#if FEMTO
24+
return true;
25+
#else
26+
return false;
27+
#endif
28+
}
29+
}
30+
1931
/// <summary>
2032
/// Tries to decompress the image. Will return true if the image needed to be decompressed and therefor should get disposed of by the caller.
2133
/// </summary>
@@ -295,7 +307,13 @@ public static IObservable<Capture> DecompressColorImages(this IObservable<Captur
295307
var colorImage = c.Color;
296308
if (colorImage != null && colorImage.TryToDecompress(out var decompressedImage))
297309
return Observable.Using(
298-
() => CreateCapture(decompressedImage, c.Depth?.Reference(), c.IR?.Reference(), c.Temperature),
310+
() =>
311+
{
312+
#if FEMTO
313+
decompressedImage = decompressedImage.Reference();
314+
#endif
315+
return CreateCapture(decompressedImage, c.Depth?.Reference(), c.IR?.Reference(), c.Temperature);
316+
},
299317
x => Observable.Return(x));
300318
else
301319
return Observable.Return(c);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
6+
<Platform>x64</Platform>
7+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
8+
<Platforms>x64</Platforms>
9+
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
10+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
11+
<OutputPath>..\lib\</OutputPath>
12+
<AssemblyName>VL.Devices.AzureKinect</AssemblyName>
13+
<DefineConstants>FEMTO</DefineConstants>
14+
</PropertyGroup>
15+
16+
<ItemGroup>
17+
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.11" />
18+
<PackageReference Include="VL.Core" Version="2021.4.10" />
19+
</ItemGroup>
20+
21+
<!-- The modified version inlcuding the Playback API (https://github.com/microsoft/Azure-Kinect-Sensor-SDK/pull/1711) -->
22+
<ItemGroup>
23+
<Reference Include="Microsoft.Azure.Kinect.Sensor">
24+
<HintPath>..\dependencies\Microsoft.Azure.Kinect.Sensor\Microsoft.Azure.Kinect.Sensor.dll</HintPath>
25+
</Reference>
26+
<Reference Include="Microsoft.Azure.Kinect.Sensor.Record">
27+
<HintPath>..\dependencies\Microsoft.Azure.Kinect.Sensor.Record\Microsoft.Azure.Kinect.Sensor.Record.dll</HintPath>
28+
</Reference>
29+
<Reference Include="Microsoft.Azure.Kinect.BodyTracking">
30+
<HintPath>..\dependencies\Microsoft.Azure.Kinect.BodyTracking\Microsoft.Azure.Kinect.BodyTracking.dll</HintPath>
31+
</Reference>
32+
</ItemGroup>
33+
34+
</Project>

src/VL.Devices.AzureKinect.sln

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29306.81
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.2.11408.102 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VL.Devices.AzureKinect", "VL.Devices.AzureKinect.csproj", "{1DBBA58C-3E18-4AA7-A5F8-B1E77BD10348}"
77
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VL.Devices.AzureKinect.Femto", "VL.Devices.AzureKinect.Femto.csproj", "{C585525F-9D7C-87C8-1BA4-1742D7F8F4BC}"
9+
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|x64 = Debug|x64
@@ -15,6 +17,10 @@ Global
1517
{1DBBA58C-3E18-4AA7-A5F8-B1E77BD10348}.Debug|x64.Build.0 = Debug|x64
1618
{1DBBA58C-3E18-4AA7-A5F8-B1E77BD10348}.Release|x64.ActiveCfg = Release|x64
1719
{1DBBA58C-3E18-4AA7-A5F8-B1E77BD10348}.Release|x64.Build.0 = Release|x64
20+
{C585525F-9D7C-87C8-1BA4-1742D7F8F4BC}.Debug|x64.ActiveCfg = Debug|x64
21+
{C585525F-9D7C-87C8-1BA4-1742D7F8F4BC}.Debug|x64.Build.0 = Debug|x64
22+
{C585525F-9D7C-87C8-1BA4-1742D7F8F4BC}.Release|x64.ActiveCfg = Release|x64
23+
{C585525F-9D7C-87C8-1BA4-1742D7F8F4BC}.Release|x64.Build.0 = Release|x64
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)