jonigata commited on
Commit
6b267c6
1 Parent(s): 1205af7

adjust initial position

Browse files
Files changed (1) hide show
  1. static/poseEditor.js +4 -3
static/poseEditor.js CHANGED
@@ -3,7 +3,7 @@ var canvas = null;
3
  var ctx = null;
4
 
5
  // candidateの形式:[[x1, y1, score1], [x2, y2, score2], ...]
6
- const candidate = [
7
  [235, 158, 0.93167633],
8
  [234, 220, 0.97106987],
9
  [193, 222, 0.93366587],
@@ -23,7 +23,8 @@ const candidate = [
23
  [208, 158, 0.92053992],
24
  [258, 154, 0.73533273]
25
  ];
26
-
 
27
  // subsetの形式:[[index1, index2, ..., -1], [index1, index2, ..., -1], ...]
28
  const subset = [
29
  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 33.81122635, 18]
@@ -84,7 +85,7 @@ function drawBodyPose(candidate, subset) {
84
  ctx.fillStyle = `rgb(${colors[i].join(',')})`;
85
  ctx.fill();
86
  ctx.fillStyle = 'rgb(255,255,255)'
87
- ctx.fillText(index, x-3, y+4);
88
  }
89
  }
90
  }
 
3
  var ctx = null;
4
 
5
  // candidateの形式:[[x1, y1, score1], [x2, y2, score2], ...]
6
+ const candidateSource = [
7
  [235, 158, 0.93167633],
8
  [234, 220, 0.97106987],
9
  [193, 222, 0.93366587],
 
23
  [208, 158, 0.92053992],
24
  [258, 154, 0.73533273]
25
  ];
26
+ const candidate = candidateSource.map(point => [point[0], point[1] - 70, point[2]]);
27
+
28
  // subsetの形式:[[index1, index2, ..., -1], [index1, index2, ..., -1], ...]
29
  const subset = [
30
  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 33.81122635, 18]
 
85
  ctx.fillStyle = `rgb(${colors[i].join(',')})`;
86
  ctx.fill();
87
  ctx.fillStyle = 'rgb(255,255,255)'
88
+ // ctx.fillText(index, x-3, y+4);
89
  }
90
  }
91
  }