Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
LeC-D committed Nov 28, 2018
1 parent 9bf27aa commit a7bb8c3
Show file tree
Hide file tree
Showing 659 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Projet/Bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run(self):


else:
img = np.asarray(Image.open('./asl_alphabet_test/I_test.jpg').convert('L'))
img = np.asarray(Image.open('./asl_alphabet_test/K_test.jpg').convert('L'))
res = Pipeline().run(img)
test = np.asarray(res[0])
t = Image.fromarray(test)
Expand Down
7 changes: 6 additions & 1 deletion Projet/BoundaryTracing/BoudaryTracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def trace(self):

mask = np.zeros((len(self.image), len(self.image[0])))
while x != self.maxx:
old_ud = self.UD

if self.UD == 1:
count_up += 1
Expand Down Expand Up @@ -107,10 +108,14 @@ def trace(self):

ret_points.append([x, y])

if count_up > 5 and self.UD == -1:
if count_up > 40 and self.UD == -1:
fingertip += 1
count_up = 0

if self.UD != old_ud and self.UD == -1:
count_up = 0


self.flush()
return [mask, fingertip, ret_points]

Expand Down
Binary file modified Projet/BoundaryTracing/__pycache__/BoudaryTracing.cpython-35.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions Projet/EdgeDetection/EdgeDetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

class EdgeDetection:
def __init__(self):
self.threshold_1 = 80
self.threshold_2 = 50
self.threshold_1 = 50
self.threshold_2 = 20

def calc_offset(self, angle):

Expand Down
Binary file modified Projet/EdgeDetection/__pycache__/EdgeDetection.cpython-35.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions Projet/FormatData.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
constant = cv2.copyMakeBorder(img, 10, 0, 10, 10, cv2.BORDER_CONSTANT,value=BLACK)
constant = Image.fromarray(constant)
w, h = constant.size
constant = np.asarray(constant.crop((0, 0, w, h - 15)))
constant = np.asarray(constant.crop((0, 0, w, h - 20)))

out = [i + "_" for i in img_path.split('_')[1:-2]]
out = [i + "_" for i in img_path.split('_')[1:-1]]
out.append(img_path.split('_')[-1])
result = Image.fromarray(constant.astype(np.uint8))
result.save(curpath + output_path + "".join(out))
6 changes: 6 additions & 0 deletions Projet/Pipeline/Pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

from Shared.Borg import Borg

import matplotlib.pyplot as plt
import matplotlib.image as mpimg

import numpy as np
from PIL import Image

class Pipeline(Borg):
def __init__(self):
self.edgeDetec = EdgeDetection()
Expand Down
Binary file modified Projet/Pipeline/__pycache__/Pipeline.cpython-35.pyc
Binary file not shown.
Binary file added Projet/TrainingSet/a_bot_seg_1_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_bot_seg_3_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_bot_seg_4_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_bot_seg_5_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_dif_seg_1_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_dif_seg_2_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_dif_seg_4_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_dif_seg_5_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_left_seg_2_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_left_seg_3_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_left_seg_4_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_left_seg_5_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_right_seg_1_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_right_seg_2_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_right_seg_4_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_right_seg_5_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_top_seg_2_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_top_seg_3_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_top_seg_4_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/a_top_seg_5_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Projet/TrainingSet/b_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/b_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/b_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/b_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/b_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/b_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/b_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/b_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/b_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/b_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/b_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/b_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/b_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/b_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/b_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/b_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/b_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/b_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/b_top_seg_4_cropped.png
Binary file added Projet/TrainingSet/b_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/c_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/c_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/c_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/c_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/c_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/c_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/c_dif_seg_4_cropped.png
Binary file added Projet/TrainingSet/c_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/c_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/c_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/c_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/c_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/c_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/c_right_seg_3_cropped.png
Binary file added Projet/TrainingSet/c_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/c_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/c_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/c_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/c_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/c_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/d_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/d_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/d_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/d_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/d_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/d_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/d_dif_seg_4_cropped.png
Binary file added Projet/TrainingSet/d_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/d_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/d_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/d_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/d_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/d_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/d_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/d_right_seg_3_cropped.png
Binary file added Projet/TrainingSet/d_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/d_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/d_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/d_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/d_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/e_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/e_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/e_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/e_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/e_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/e_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/e_dif_seg_4_cropped.png
Binary file added Projet/TrainingSet/e_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/e_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/e_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/e_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/e_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/e_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/e_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/e_right_seg_3_cropped.png
Binary file added Projet/TrainingSet/e_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/e_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/e_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/e_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/e_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/f_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/f_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/f_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/f_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/f_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/f_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/f_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/f_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/f_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/f_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/f_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/f_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/f_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/f_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/f_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/f_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/f_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/f_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/f_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/f_top_seg_4_cropped.png
Binary file added Projet/TrainingSet/g_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/g_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/g_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/g_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/g_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/g_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/g_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/g_dif_seg_4_cropped.png
Binary file added Projet/TrainingSet/g_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/g_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/g_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/g_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/g_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/g_right_seg_3_cropped.png
Binary file added Projet/TrainingSet/g_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/g_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/g_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/g_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/g_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/g_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/h_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/h_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/h_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/h_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/h_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/h_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/h_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/h_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/h_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/h_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/h_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/h_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/h_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/h_right_seg_3_cropped.png
Binary file added Projet/TrainingSet/h_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/h_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/h_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/h_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/h_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/h_top_seg_4_cropped.png
Binary file added Projet/TrainingSet/i_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/i_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/i_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/i_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/i_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/i_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/i_dif_seg_4_cropped.png
Binary file added Projet/TrainingSet/i_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/i_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/i_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/i_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/i_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/i_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/i_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/i_right_seg_3_cropped.png
Binary file added Projet/TrainingSet/i_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/i_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/i_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/i_top_seg_4_cropped.png
Binary file added Projet/TrainingSet/i_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/j_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/j_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/j_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/j_bot_seg_5_cropped.png
Binary file added Projet/TrainingSet/j_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/j_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/j_dif_seg_4_cropped.png
Binary file added Projet/TrainingSet/j_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/j_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/j_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/j_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/j_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/j_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/j_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/j_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/j_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/j_top_seg_1_cropped.png
Binary file added Projet/TrainingSet/j_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/j_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/j_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/k_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/k_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/k_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/k_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/k_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/k_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/k_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/k_dif_seg_5_cropped.png
Binary file added Projet/TrainingSet/k_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/k_left_seg_2_cropped.png
Binary file added Projet/TrainingSet/k_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/k_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/k_right_seg_2_cropped.png
Binary file added Projet/TrainingSet/k_right_seg_3_cropped.png
Binary file added Projet/TrainingSet/k_right_seg_4_cropped.png
Binary file added Projet/TrainingSet/k_right_seg_5_cropped.png
Binary file added Projet/TrainingSet/k_top_seg_2_cropped.png
Binary file added Projet/TrainingSet/k_top_seg_3_cropped.png
Binary file added Projet/TrainingSet/k_top_seg_4_cropped.png
Binary file added Projet/TrainingSet/k_top_seg_5_cropped.png
Binary file added Projet/TrainingSet/l_bot_seg_1_cropped.png
Binary file added Projet/TrainingSet/l_bot_seg_2_cropped.png
Binary file added Projet/TrainingSet/l_bot_seg_3_cropped.png
Binary file added Projet/TrainingSet/l_bot_seg_4_cropped.png
Binary file added Projet/TrainingSet/l_dif_seg_1_cropped.png
Binary file added Projet/TrainingSet/l_dif_seg_2_cropped.png
Binary file added Projet/TrainingSet/l_dif_seg_3_cropped.png
Binary file added Projet/TrainingSet/l_dif_seg_4_cropped.png
Binary file added Projet/TrainingSet/l_left_seg_1_cropped.png
Binary file added Projet/TrainingSet/l_left_seg_3_cropped.png
Binary file added Projet/TrainingSet/l_left_seg_4_cropped.png
Binary file added Projet/TrainingSet/l_left_seg_5_cropped.png
Binary file added Projet/TrainingSet/l_right_seg_1_cropped.png
Binary file added Projet/TrainingSet/l_right_seg_2_cropped.png
Loading

0 comments on commit a7bb8c3

Please sign in to comment.