Blob Blame History Raw
diff -up ./Data/GlobalDefaults.ini.willow ./Data/GlobalDefaults.ini
--- ./Data/GlobalDefaults.ini.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Data/GlobalDefaults.ini	2014-06-01 16:23:35.072680642 -0400
@@ -6,7 +6,7 @@ LogMasks=ALL
 ; 0 - No (default), 1 - Yes
 ;LogWriteToConsole=1
 ; 0 - No (default), 1 - Yes
-LogWriteToFile=1
+;LogWriteToFile=1
 ; 0 - No (default), 1 - Yes
 ;LogWriteLineInfo=0
 ; leave empty for nothing (default). ALL - all masks
diff -up ./Source/XnDeviceSensorV2/Registration.cpp.willow ./Source/XnDeviceSensorV2/Registration.cpp
--- ./Source/XnDeviceSensorV2/Registration.cpp.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Source/XnDeviceSensorV2/Registration.cpp	2014-06-01 16:23:35.064680329 -0400
@@ -466,13 +466,28 @@ void XnRegistration::Apply1000(XnDepthPi
 			nNewX = (XnInt32)(XnDouble(*pRegTable)/XN_REG_X_SCALE + XnInt32(pDepth2ShiftTable[nValue]/XN_REG_PARAB_COEFF - nConstShift) * dShiftFactor);
 			nNewY = *(pRegTable+1);
 
-			if ((XnUInt32)nNewX-1 < (XnUInt32)nDepthXRes-1)
+			if ((XnUInt32)nNewX-1 < (XnUInt32)nDepthXRes-1 && (XnUInt32)nNewY <(XnUInt32) nDepthYRes)
 			{
 				nArrPos = nNewY * nDepthXRes + nNewX;
 				nOutValue = pOutput[nArrPos];
 
 				if (nOutValue == 0 || nOutValue > nValue)
 				{
+				  if ( nNewX > 0 && nNewY > 0 )
+					{
+						pOutput[nArrPos-nDepthXRes] = nValue;
+						pOutput[nArrPos-nDepthXRes-1] = nValue;
+						pOutput[nArrPos-1] = nValue;
+					}
+					else if( nNewY > 0 )
+					{
+						pOutput[nArrPos-nDepthXRes] = nValue;
+					}
+					else if( nNewX > 0 )
+					{
+						pOutput[nArrPos-1] = nValue;
+					}
+    
 					pOutput[nArrPos] = nValue;
 					pOutput[nArrPos-1] = nValue;
 					pOutput[nArrPos-nDepthXRes] = nValue;
diff -up ./Source/XnDeviceSensorV2/XnDataProcessor.h.willow ./Source/XnDeviceSensorV2/XnDataProcessor.h
--- ./Source/XnDeviceSensorV2/XnDataProcessor.h.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Source/XnDeviceSensorV2/XnDataProcessor.h	2014-06-01 16:23:35.065680368 -0400
@@ -89,7 +89,9 @@ protected:
 	/* The number of bytes received so far (since last time this member was reset). */
 	XnUInt32 m_nBytesReceived;
 	/* Stores last packet ID */
-	XnUInt16 m_nLastPacketID;
+	//XnUInt16 m_nLastPacketID;
+	// --avin mod--
+  XnUInt8  m_nLastPacketID;
 	/* The name of the stream. */
 	const XnChar* m_csName;
 
diff -up ./Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp.willow ./Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp
diff -up ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h.willow ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h
--- ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h	2014-06-01 16:23:35.066680407 -0400
@@ -85,7 +85,10 @@ typedef struct XnSensorProtocolResponseH
 {
 	XnUInt16 nMagic;
 	XnUInt16 nType;
-	XnUInt16 nPacketID;
+	//XnUInt16 nPacketID;
+  // --avin mod--
+  XnUInt8  nPacketID;
+  XnUInt8  nUnknown;
 	XnUInt16 nBufSize;
 	XnUInt32 nTimeStamp;
 } XnSensorProtocolResponseHeader;
diff -up ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp.willow ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp
--- ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp	2014-06-01 16:23:35.067680446 -0400
@@ -110,11 +110,12 @@ XnStatus XnFirmwareStreams::CheckClaimSt
 				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Cannot set depth stream to resolution %d when IR is set to resolution %d!", nRes, pIRStreamData->nRes);
 			}
 
+      // highres enable from avin
 			// check FPS
-			if (pIRStreamData->nFPS != nFPS)
-			{
-				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
-			}
+			//if (pIRStreamData->nFPS != nFPS)
+			//{
+			//	XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
+			//}
 		}
 	}
 	else if (strcmp(strType, XN_STREAM_TYPE_IR) == 0)
@@ -146,10 +147,10 @@ XnStatus XnFirmwareStreams::CheckClaimSt
 			}
 
 			// check FPS
-			if (pDepthStreamData->nFPS != nFPS)
-			{
-				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
-			}
+			//if (pDepthStreamData->nFPS != nFPS)
+			//{
+			//	XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
+			//}
 		}
 	}
 	else if (strcmp(strType, XN_STREAM_TYPE_IMAGE) == 0)
diff -up ./Source/XnDeviceSensorV2/XnHostProtocol.h.willow ./Source/XnDeviceSensorV2/XnHostProtocol.h
--- ./Source/XnDeviceSensorV2/XnHostProtocol.h.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Source/XnDeviceSensorV2/XnHostProtocol.h	2014-06-01 16:23:35.067680446 -0400
@@ -107,8 +107,8 @@ enum EPsProtocolOpCodes_V017
 typedef enum
 {
 	XN_HOST_PROTOCOL_ALGORITHM_DEPTH_INFO	= 0x00,
-	XN_HOST_PROTOCOL_ALGORITHM_REGISTRATION	= 0x02,
-	XN_HOST_PROTOCOL_ALGORITHM_PADDING		= 0x03,
+	XN_HOST_PROTOCOL_ALGORITHM_REGISTRATION	= 0x40,
+	XN_HOST_PROTOCOL_ALGORITHM_PADDING		= 0x41,
 	XN_HOST_PROTOCOL_ALGORITHM_BLANKING		= 0x06,
 	XN_HOST_PROTOCOL_ALGORITHM_DEVICE_INFO	= 0x07,
 	XN_HOST_PROTOCOL_ALGORITHM_FREQUENCY	= 0x80
diff -up ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp.willow ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp
--- ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp	2014-06-01 16:23:35.068680486 -0400
@@ -319,6 +319,8 @@ XnStatus XnSensorDepthStream::ConfigureS
 	nRetVal = m_Helper.GetCmosInfo()->SetCmosConfig(XN_CMOS_TYPE_DEPTH, GetResolution(), GetFPS());
 	XN_IS_STATUS_OK(nRetVal);
 
+  // Thanks to avin again! :-)
+  XnHostProtocolSetParam(GetHelper()->GetPrivateData(), 0x105, 0);
 	return XN_STATUS_OK;
 }
 
diff -up ./Source/XnDeviceSensorV2/XnSensorDepthStream.h.willow ./Source/XnDeviceSensorV2/XnSensorDepthStream.h
--- ./Source/XnDeviceSensorV2/XnSensorDepthStream.h.willow	2014-06-01 16:23:35.068680486 -0400
+++ ./Source/XnDeviceSensorV2/XnSensorDepthStream.h	2014-06-01 16:31:59.481440578 -0400
@@ -38,13 +38,13 @@
 	#define XN_DEPTH_STREAM_DEFAULT_RESOLUTION					XN_RESOLUTION_QQVGA
 #else
 	#define XN_DEPTH_STREAM_DEFAULT_INPUT_FORMAT				XN_IO_DEPTH_FORMAT_UNCOMPRESSED_11_BIT
-	#define XN_DEPTH_STREAM_DEFAULT_RESOLUTION					XN_RESOLUTION_QVGA
+	#define XN_DEPTH_STREAM_DEFAULT_RESOLUTION					XN_RESOLUTION_VGA
 #endif
 
 #define XN_DEPTH_STREAM_DEFAULT_FPS							30
 #define XN_DEPTH_STREAM_DEFAULT_OUTPUT_FORMAT				XN_OUTPUT_FORMAT_DEPTH_VALUES
 #define XN_DEPTH_STREAM_DEFAULT_REGISTRATION				FALSE
-#define XN_DEPTH_STREAM_DEFAULT_REGISTRATION_TYPE			XN_PROCESSING_DONT_CARE
+#define XN_DEPTH_STREAM_DEFAULT_REGISTRATION_TYPE			XN_PROCESSING_SOFTWARE
 #define XN_DEPTH_STREAM_DEFAULT_HOLE_FILLER					TRUE
 #define XN_DEPTH_STREAM_DEFAULT_WHITE_BALANCE				TRUE
 #define XN_DEPTH_STREAM_DEFAULT_GAIN_OLD					50
diff -up ./Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp.willow ./Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp
diff -up ./Source/XnDeviceSensorV2/XnSensorImageStream.cpp.willow ./Source/XnDeviceSensorV2/XnSensorImageStream.cpp
diff -up ./Source/XnDeviceSensorV2/XnSensorImageStream.h.willow ./Source/XnDeviceSensorV2/XnSensorImageStream.h
--- ./Source/XnDeviceSensorV2/XnSensorImageStream.h.willow	2013-11-12 08:00:50.000000000 -0500
+++ ./Source/XnDeviceSensorV2/XnSensorImageStream.h	2014-06-01 16:23:35.071680603 -0400
@@ -31,8 +31,8 @@
 // Defines
 //---------------------------------------------------------------------------
 #define XN_IMAGE_STREAM_DEFAULT_FPS				30
-#define XN_IMAGE_STREAM_DEFAULT_RESOLUTION		XN_RESOLUTION_QVGA
-#define XN_IMAGE_STREAM_DEFAULT_INPUT_FORMAT	XN_IO_IMAGE_FORMAT_UNCOMPRESSED_YUV422
+#define XN_IMAGE_STREAM_DEFAULT_RESOLUTION		XN_RESOLUTION_VGA
+#define XN_IMAGE_STREAM_DEFAULT_INPUT_FORMAT	XN_IO_IMAGE_FORMAT_UNCOMPRESSED_BAYER
 #define XN_IMAGE_STREAM_DEFAULT_OUTPUT_FORMAT	XN_OUTPUT_FORMAT_RGB24
 #define XN_IMAGE_STREAM_DEFAULT_FLICKER			0
 #define XN_IMAGE_STREAM_DEFAULT_QUALITY			3
@@ -169,4 +169,4 @@ private:
 	XnActualIntProperty m_ActualRead;
 };
 
-#endif //__XN_SENSOR_IMAGE_STREAM_H__
\ No newline at end of file
+#endif //__XN_SENSOR_IMAGE_STREAM_H__
diff -up ./Source/XnDeviceSensorV2/XnSensorIRStream.cpp.willow ./Source/XnDeviceSensorV2/XnSensorIRStream.cpp