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.
This commit is contained in:
2024-02-26 01:35:36 +01:00
parent 5c113e31e8
commit 4d664bbbd5
+2 -1
View File
@@ -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)