From 43e03a45d24201ea45fb0bc334513bda723e93fe Mon Sep 17 00:00:00 2001 From: glopesdev Date: Wed, 12 Jun 2024 02:18:14 +0100 Subject: [PATCH] Add logging of all pose identity scores --- src/Aeon.Acquisition/Aeon.Acquisition.csproj | 4 ++-- src/Aeon.Acquisition/FormatPose.cs | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Aeon.Acquisition/Aeon.Acquisition.csproj b/src/Aeon.Acquisition/Aeon.Acquisition.csproj index 316e48e..354f117 100644 --- a/src/Aeon.Acquisition/Aeon.Acquisition.csproj +++ b/src/Aeon.Acquisition/Aeon.Acquisition.csproj @@ -5,7 +5,7 @@ A package providing common acquisition and control functionality for all Project Aeon experiments. Bonsai Rx Project Aeon Acquisition net472 - 0.5.1 + 0.6.0 @@ -24,7 +24,7 @@ - + diff --git a/src/Aeon.Acquisition/FormatPose.cs b/src/Aeon.Acquisition/FormatPose.cs index a8c9d2d..f1e1403 100644 --- a/src/Aeon.Acquisition/FormatPose.cs +++ b/src/Aeon.Acquisition/FormatPose.cs @@ -26,9 +26,13 @@ public IObservable Process(IObservable> s var i = 0; var pose = payload.Value; var timestamp = payload.Seconds; - var data = new float[5 + pose.Count * 3]; + var data = new float[4 + pose.IdentityScores.Length + pose.Count * 3]; data[i++] = IdentityIndex.GetValueOrDefault(pose.IdentityIndex); - data[i++] = pose.Confidence; + for (int k = 0; k < pose.IdentityScores.Length; k++) + { + data[i++] = pose.IdentityScores[k]; + } + data[i++] = pose.Centroid.Position.X; data[i++] = pose.Centroid.Position.Y; data[i++] = pose.Centroid.Confidence; @@ -51,11 +55,15 @@ public IObservable Process(IObservable { int i = 0; - var data = new float[5 + pose.Count * 3]; + var data = new float[4 + pose.IdentityScores.Length + pose.Count * 3]; data[i++] = IdentityIndex.HasValue ? IdentityIndex.GetValueOrDefault() + index : pose.IdentityIndex; - data[i++] = pose.Confidence; + for (int k = 0; k < pose.IdentityScores.Length; k++) + { + data[i++] = pose.IdentityScores[k]; + } + data[i++] = pose.Centroid.Position.X; data[i++] = pose.Centroid.Position.Y; data[i++] = pose.Centroid.Confidence;