From eb768c325c37e3493e443a6451ac9ab40cb3fd06 Mon Sep 17 00:00:00 2001 From: Sebastian Hahta <joseha@utu.fi> Date: Wed, 18 Mar 2020 15:34:39 +0200 Subject: [PATCH] fix pose --- SDK/C/include/ftl/ftl.h | 13 ++++++------- SDK/Python/blender.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/SDK/C/include/ftl/ftl.h b/SDK/C/include/ftl/ftl.h index 6a9afabeb..2946f25cf 100644 --- a/SDK/C/include/ftl/ftl.h +++ b/SDK/C/include/ftl/ftl.h @@ -146,7 +146,7 @@ ftlError_t ftlSetConfigString(ftlStream_t stream, const char *name, const char * * path part of a configurable URI, this is prepended with the streams internal * URI so that this path is relative to the stream object. An example: * `ftlSetConfigInt(stream, "sender/codec", 2);` - * + * * The example makes the streams encoder use HEVC codec. */ ftlError_t ftlSetConfigInt(ftlStream_t stream, const char *name, int value); @@ -160,7 +160,7 @@ ftlError_t ftlSetConfigJSON(ftlStream_t stream, const char *name, const char *js * path part of a configurable URI, this is prepended with the streams internal * URI so that this path is relative to the stream object. An example: * `ftlSetConfigBool(stream, "sender/lossless", false);` - * + * * The example makes the streams encoder use lossy encoding. */ ftlError_t ftlSetConfigBool(ftlStream_t stream, const char *name, bool value); @@ -184,14 +184,14 @@ ftlError_t ftlSetConfigBool(ftlStream_t stream, const char *name, bool value); * the pitch is assumed to be width multiplied by size of pixel in bytes. Note * that `ftlNextFrame` must be called before calling this again for the same * source and channel. - * + * * @param stream As created with `ftlCreateWriteStream` * @param sourceId Unique consecutive ID for a camera or source * @param channel The image channel * @param type The image format * @param pitch Bytes per row, in case different from width x sizeof(type) * @param data Raw image data, pitch x height bytes in size - * + * * @return FTLERROR_OK on success */ ftlError_t ftlImageWrite( @@ -207,7 +207,7 @@ ftlError_t ftlImageWrite( * frames when `ftlNextFrame` is called. When reading an FTL file this is * determined automatically. Default is 25 fps. Advised to call this only once * before any call to `ftlNextFrame`. - * + * * @param stream As created with `ftlCreateWriteStream` * @param fps Frames per second of video output */ @@ -222,8 +222,7 @@ ftlError_t ftlNextFrame(ftlStream_t stream); /** * Write of 4x4 transformation matrix into the stream for a given source. The - * `data` pointer must contain 16 float values packed and in Eigen::Matrix4f - * form. + * `data` pointer must contain 16 float values in column major order. */ ftlError_t ftlPoseWrite(ftlStream_t stream, int32_t sourceId, const float *data); diff --git a/SDK/Python/blender.py b/SDK/Python/blender.py index b5a74504e..45e056766 100644 --- a/SDK/Python/blender.py +++ b/SDK/Python/blender.py @@ -204,7 +204,7 @@ def render_stereo(camera, baseline=0.15): d_max = max(np.max(depthL), np.max(depthR)) pose = np.identity(4,dtype=np.float32) pose[0:3,0:4] = get_3x4_RT_matrix_from_blender(camera) - pose = np.linalg.inv(pose.T) + pose = np.linalg.inv(pose) ftlcamera = get_ftl_calibration_from_blender(camera.data, baseline=baseline, d_max=d_max) -- GitLab