sucht jetzt den max wert für die pixel länge => bessere Approximation?
This commit is contained in:
2024-02-27 01:19:23 +01:00
parent 3fcfafa388
commit 2b1087b3ce
+3 -1
View File
@@ -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