From 12dd7fcae584e07ea6f87bbef126ecdac4c2a648 Mon Sep 17 00:00:00 2001 From: iperov Date: Mon, 7 Jan 2019 09:40:00 +0400 Subject: [PATCH] fixed sort by yaw feeder --- samples/SampleLoader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/SampleLoader.py b/samples/SampleLoader.py index b74f4da..ce31032 100644 --- a/samples/SampleLoader.py +++ b/samples/SampleLoader.py @@ -72,9 +72,9 @@ class SampleLoader: return sample_list @staticmethod - def upgradeToFaceYawSortedSamples( YAW_RAWS ): + def upgradeToFaceYawSortedSamples( samples ): - lowest_yaw, highest_yaw = -32, +32 + lowest_yaw, highest_yaw = -256, +256 gradations = 64 diff_rot_per_grad = abs(highest_yaw-lowest_yaw) / gradations @@ -85,7 +85,7 @@ class SampleLoader: next_yaw = lowest_yaw + (i+1)*diff_rot_per_grad yaw_samples = [] - for s in YAW_RAWS: + for s in samples: s_yaw = s.yaw if (i == 0 and s_yaw < next_yaw) or \ (i < gradations-1 and s_yaw >= yaw and s_yaw < next_yaw) or \