Skip to content

Bug in warp_depth.m #1

@wiedemannc

Description

@wiedemannc

I'm pretty sure that warp_depth is intended to be this way:


diff --git a/warp_depth.m b/warp_depth.m
index 5b41545..2eeb4a6 100644
--- a/warp_depth.m
+++ b/warp_depth.m
@@ -62,7 +62,7 @@ function [ dtof_warped, ir_warped ] = warp_depth( P_TOF, K_GRAY, dtof, ir, M, N,
     % mapping of depth image points into 3D space
     lines3D = inv([P_TOF;0,0,0,1])*ptst;
     nor = 1 ./ sqrt(sum(lines3D.^2, 1));
-    lines3D = bsxfun(@rdivide, lines3D, nor);
+    lines3D = bsxfun(@times, lines3D, nor);
     ptsTof_real = repmat(C_TOF(1:3,:), [1, size(lines3D,2)]) + lines3D(1:3,:).*repmat(dtof(:)', [3,1]);
     ptsTof_real = ptsTof_real(:,flags_tof(:)' == 1);
     val_idxtof = idxtof(flags_tof(:)' == 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions