patch
patch
This commit is contained in:
@@ -166,10 +166,15 @@ class tutel():
|
||||
if self.bottom_left[1] < self.bottom_right[1]: y = (self.bottom_left[1],self.bottom_right[1])
|
||||
else: y = (self.bottom_right[1],self.bottom_left[1])
|
||||
cv2.line(depth_image, (x[0],y[0]), (x[1],y[1]), (0,255,0), 2)
|
||||
depth_values = []
|
||||
for i in range(x[0], x[1]):
|
||||
for j in range(y[0], y[1]):
|
||||
if depth_image[j][i] > (max(depth_image)-10):
|
||||
self.last_depth += depth_image[j][i]
|
||||
if depth_image[j][i] > 399:
|
||||
depth_values.append(depth_image[j][i])
|
||||
#depth_values = np.array(depth_values)
|
||||
for k in range(0, len(depth_values)):
|
||||
if depth_values[k] > (max(depth_values) - 9):
|
||||
self.last_depth += depth_values[k]
|
||||
self.number_of_operations += 1
|
||||
self.last_depth /= self.number_of_operations
|
||||
print(self.depth_counter, self.last_depth, self.number_of_operations)
|
||||
|
||||
Reference in New Issue
Block a user