Skip to content

Commit

Permalink
nettoyage gesture
Browse files Browse the repository at this point in the history
  • Loading branch information
serge committed May 13, 2021
1 parent e2bb366 commit a266777
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion blender-skeleton/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def get_points_blender(data):
if val == [-1000000, -1000000, -1000000]:
points.append(None)
else:
# Conversion
# Conversion cubemos vers blender
points.append([val[0]/1000, val[2]/1000, -val[1]/1000])
else:
points = None
Expand Down
15 changes: 0 additions & 15 deletions get_skeleton/gestures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
from time import time, sleep
from json import load
import numpy as np
from collections import deque

try:
from scipy.signal import savgol_filter
SCIPY = True
except:
print("Vous devez installer scipy !")
SCIPY = False

GESTURES = { 2: (7, 5),
3: (4, 2),
Expand Down Expand Up @@ -50,14 +43,6 @@ def __init__(self, client):
self.points_old = None
self.center = [0,0,0]

# Filtres: toutes les coordonnées sont dans une pile
self.piles = []
pile_size = 10
for i in range(18):
self.piles.append([])
for j in range(3):
self.piles[i].append(deque(maxlen=pile_size))

# Lissage: 18 x 3 x LISSAGE
self.liss = []
for i in range(18):
Expand Down
6 changes: 3 additions & 3 deletions get_skeleton/get_cubemos_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def render_ids_3d(self, color_image, skeletons_2d, depth_map,
low_bound_x = max(0, l)
m = int(joints_2D[joint_index].x + math.ceil(kernel/2))
upper_bound_x = min(cols - 1, m)
n = int(joints_2D[joint_index].y - math.floor(kernel / 2))
n = int(joints_2D[joint_index].y - math.floor(kernel/2))
low_bound_y = max(0, n)
o = int(joints_2D[joint_index].y + math.ceil(kernel / 2))
o = int(joints_2D[joint_index].y + math.ceil(kernel/2))
upper_bound_y = min(rows - 1, o)
for x in range(low_bound_x, upper_bound_x):
for y in range(low_bound_y, upper_bound_y):
Expand Down Expand Up @@ -123,7 +123,7 @@ def run(self):
continue

# Convert images to numpy arrays
depth_image = np.asanyarray(depth.get_data())
# #depth_image = np.asanyarray(depth.get_data())
color_image = np.asanyarray(color.get_data())

# perform inference and update the tracking id
Expand Down

0 comments on commit a266777

Please sign in to comment.