mirror of https://github.com/vladmandic/human
add z axis scaling
parent
f1293948b5
commit
cdd10d06b8
|
@ -59,11 +59,11 @@ class HandPipeline {
|
||||||
|
|
||||||
transformRawCoords(rawCoords, box2, angle, rotationMatrix) {
|
transformRawCoords(rawCoords, box2, angle, rotationMatrix) {
|
||||||
const boxSize = box.getBoxSize(box2);
|
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) => [
|
const coordsScaled = rawCoords.map((coord) => [
|
||||||
scaleFactor[0] * (coord[0] - this.inputSize / 2),
|
scaleFactor[0] * (coord[0] - this.inputSize / 2),
|
||||||
scaleFactor[1] * (coord[1] - this.inputSize / 2),
|
scaleFactor[1] * (coord[1] - this.inputSize / 2),
|
||||||
coord[2],
|
scaleFactor[2] * coord[2],
|
||||||
]);
|
]);
|
||||||
const coordsRotationMatrix = util.buildRotationMatrix(angle, [0, 0]);
|
const coordsRotationMatrix = util.buildRotationMatrix(angle, [0, 0]);
|
||||||
const coordsRotated = coordsScaled.map((coord) => {
|
const coordsRotated = coordsScaled.map((coord) => {
|
||||||
|
|
2
wiki
2
wiki
|
@ -1 +1 @@
|
||||||
Subproject commit 57cd392ca982309419d6a00b7aa6174605c950f6
|
Subproject commit 489063ec16cf35ff3c91e3f90d44fa8351210aea
|
Loading…
Reference in New Issue