From 5cd65a69525d373a701075e86a67dd5ac1ebe0d5 Mon Sep 17 00:00:00 2001 From: "Jacob.lsx" Date: Sun, 31 Jan 2021 17:02:40 +0800 Subject: [PATCH] [Fix]: Transformation matrix inverse bug --- include/mynteye/types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/mynteye/types.h b/include/mynteye/types.h index b3a04db..964e77b 100644 --- a/include/mynteye/types.h +++ b/include/mynteye/types.h @@ -625,7 +625,9 @@ struct MYNTEYE_API Extrinsics { return {{{rotation[0][0], rotation[1][0], rotation[2][0]}, {rotation[0][1], rotation[1][1], rotation[2][1]}, {rotation[0][2], rotation[1][2], rotation[2][2]}}, - {-translation[0], -translation[1], -translation[2]}}; + {-(rotation[0][0]*translation[0] + rotation[1][0]*translation[1] + rotation[2][0]*translation[2]), + -(rotation[0][1]*translation[0] + rotation[1][1]*translation[1] + rotation[2][1]*translation[2]), + -(rotation[0][2]*translation[0] + rotation[1][2]*translation[1] + rotation[2][2]*translation[2])}}; } };