From 253030830fc3419dd3d51efadcf57839015ffed0 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 16 Dec 2020 19:16:54 -0500 Subject: [PATCH] add z axis scaling --- src/hand/handpipeline.js | 4 ++-- wiki | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hand/handpipeline.js b/src/hand/handpipeline.js index cebd80cc..e00c9cd4 100644 --- a/src/hand/handpipeline.js +++ b/src/hand/handpipeline.js @@ -59,11 +59,11 @@ class HandPipeline { transformRawCoords(rawCoords, box2, angle, rotationMatrix) { const boxSize = box.getBoxSize(box2); - const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize]; + const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize, (boxSize[0] + boxSize[1]) / this.inputSize / 2]; const coordsScaled = rawCoords.map((coord) => [ scaleFactor[0] * (coord[0] - this.inputSize / 2), scaleFactor[1] * (coord[1] - this.inputSize / 2), - coord[2], + scaleFactor[2] * coord[2], ]); const coordsRotationMatrix = util.buildRotationMatrix(angle, [0, 0]); const coordsRotated = coordsScaled.map((coord) => { diff --git a/wiki b/wiki index 57cd392c..489063ec 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 57cd392ca982309419d6a00b7aa6174605c950f6 +Subproject commit 489063ec16cf35ff3c91e3f90d44fa8351210aea