From 4d664bbbd518c602dd760a5a470e7c33aeacbf1f Mon Sep 17 00:00:00 2001 From: becker Date: Mon, 26 Feb 2024 01:35:36 +0100 Subject: [PATCH] patch modified to calculate the arithmetical mean for the amount to pixels in all four marker sides to see if we can get a better approximation. --- tiefeXpixel/depth_reader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiefeXpixel/depth_reader.py b/tiefeXpixel/depth_reader.py index 35083a3..2f5bc05 100644 --- a/tiefeXpixel/depth_reader.py +++ b/tiefeXpixel/depth_reader.py @@ -131,7 +131,8 @@ class tutel(): self.last_depth = max(depth_values) else: self.last_depth = self.last_depth - print(self.depth_counter, self.last_depth, self.number_of_pixels) + pixel_length = (abs(self.top_left[0]-self.top_right[0]) + abs(self.top_left[1] - self.bottom_left[1]) + abs(self.top_right[1]-self.bottom_right[1]) + abs(self.bottom_right[0]-self.bottom_left[0]))/4 + print(self.last_depth, self.number_of_pixels, self.pixel_length) self.number_of_operations = 0 self.number_of_pixels = 0 #cv2.imshow("Tutel_Depth", depth_image)