From 2b1087b3ce74507c03f710f8ed60d50ffbd11ea8 Mon Sep 17 00:00:00 2001 From: becker Date: Tue, 27 Feb 2024 01:19:23 +0100 Subject: [PATCH] patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sucht jetzt den max wert für die pixel länge => bessere Approximation? --- tiefeXpixel/depth_reader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tiefeXpixel/depth_reader.py b/tiefeXpixel/depth_reader.py index 14f123a..7547da7 100644 --- a/tiefeXpixel/depth_reader.py +++ b/tiefeXpixel/depth_reader.py @@ -134,7 +134,9 @@ class tutel(): print(max(depth_values)) else: self.last_depth = self.last_depth - 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 + lengths = [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])] + #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 + pixel_lengths = max(lengths) print(self.last_depth, self.number_of_pixels, pixel_length) self.number_of_operations = 0 self.number_of_pixels = 0