Skip to content
Permalink
Browse files

Kinect 4 Azure (#197)

* Add Kinect4Azure Support

* Use more flexible ProjectiveTransformationRational instead of Zhang.

* [feature][WebCam] Added MirrorImage property. (#174)
  • Loading branch information...
jangernert authored and sisiplac committed Jul 3, 2019
1 parent b7777a4 commit 72128c0063fda2b0d8e3f9fbd42dc29c547805b8
@@ -578,7 +578,7 @@ protected override CameraImage CalcChannelImpl(string channelName)
/// Overrides the standard GetIntrinsic method.
/// </summary>
/// <param name="channelName">The channel name.</param>
/// <returns>The ProjectiveTransformationZhang</returns>
/// <returns>The ProjectiveTransformationRational</returns>
/// <remarks>The method first searches for a pt file on disk. If this fails it is able to provide internal intrinsics for amplitude / depth channel.</remarks>
public override IProjectiveTransformation GetIntrinsics(string channelName)
{
@@ -598,8 +598,6 @@ public override IProjectiveTransformation GetIntrinsics(string channelName)
switch (channelName)
{
case ChannelNames.Amplitude:
result = GetFactoryIRIntrinsics();
break;
case ChannelNames.Distance:
result = GetFactoryIRIntrinsics();
break;
@@ -629,7 +627,7 @@ public IProjectiveTransformation GetFactoryIRIntrinsics()

float principalPointX = depthWidthMinusOne - intrinsics.PrincipalPointX; //Principal point in x-direction needs to be mirrored, since native Kinect images are flipped.

return new ProjectiveTransformationZhang(depthWidth, depthHeight, intrinsics.FocalLengthX, intrinsics.FocalLengthY, principalPointX, intrinsics.PrincipalPointY, intrinsics.RadialDistortionSecondOrder, intrinsics.RadialDistortionFourthOrder, intrinsics.RadialDistortionSixthOrder, 0, 0);
return new ProjectiveTransformationRational(depthWidth, depthHeight, intrinsics.FocalLengthX, intrinsics.FocalLengthY, principalPointX, intrinsics.PrincipalPointY, intrinsics.RadialDistortionSecondOrder, intrinsics.RadialDistortionFourthOrder, intrinsics.RadialDistortionSixthOrder, 0, 0, 0, 0, 0);
}

/// <summary>

0 comments on commit 72128c0

Please sign in to comment.
You can’t perform that action at this time.