add z axis scaling

pull/280/head
Vladimir Mandic 2020-12-16 19:16:54 -05:00
parent 641d56547d
commit 253030830f
2 changed files with 3 additions and 3 deletions

View File

@ -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) => {

2
wiki

@ -1 +1 @@
Subproject commit 57cd392ca982309419d6a00b7aa6174605c950f6
Subproject commit 489063ec16cf35ff3c91e3f90d44fa8351210aea