Closed xiangzhi closed 3 years ago
Thanks Zhi, sounds like we need an extra check inside the InverseOfClosedForm
method to not assume 6 radial distortion coefficients. I'll collect some Kinect 2 data and debug.
Awesome, Thanks Sean!
Ok, so it seems like the right fix is indeed setting the remaining k coefficients to 0 if they don't exist. I tested on my end and that works. Where were you seeing a denominator of 0? The only denominator I'm seeing is:
double h = 1 + k4 * radiusSq + k5 * radiusSqSq + k6 * radiusSq * radiusSqSq;
which should be simply equal to 1 if k4, k5, and k6 are 0.
I can check in a quick bug fix, but let me know if I'm missing something.
You are right. I wasn't really paying attention on my end and actually didn't recompile my PsiStudio correctly and used the old code.
I'm trying to visualizer depthImage from Kinect 2 using the newly implemented visualizers
(Shared<DepthImage>, ICameraIntrinsics, CoordinateSystem)
. It throws the following exception:The cause is that the camera intrinsic of a Kinect 2 only has 2 radial distortion coefficients(
k
) instead of 6.It might able to be solve by doing some checking and initialize the remainingEdit: It needs a different function because it makes the denominator 0 if remaining k is just 0.k
s to be 0.