コード例 #1
0
    private bool NuiImageResolutionToSize(NuiImageResolution res, out int refWidth, out int refHeight)
    {
        switch (res)
        {
        case NuiImageResolution.resolution80x60:
            refWidth  = 80;
            refHeight = 60;
            return(true);

        case NuiImageResolution.resolution320x240:
            refWidth  = 320;
            refHeight = 240;
            return(true);

        case NuiImageResolution.resolution640x480:
            refWidth  = 640;
            refHeight = 480;
            return(true);

        case NuiImageResolution.resolution1280x960:
            refWidth  = 1280;
            refHeight = 960;
            return(true);

        default:
            refWidth  = 0;
            refHeight = 0;
            break;
        }

        return(false);
    }
コード例 #2
0
    public static int NuiImageResolutionToSize(NuiImageResolution eResolution, out uint frameWidth, out uint frameHeight)
    {
        switch (eResolution)
        {
        case NuiImageResolution.resolution1280x960:
            frameHeight = 960;
            frameWidth  = 1280;
            break;

        case NuiImageResolution.resolution640x480:
            frameHeight = 480;
            frameWidth  = 640;
            break;

        case NuiImageResolution.resolution320x240:
            frameHeight = 240;
            frameWidth  = 320;
            break;

        case NuiImageResolution.resolution80x60:
            frameHeight = 60;
            frameWidth  = 80;
            break;

        default:
            frameHeight = 0;
            frameWidth  = 0;
            return(-1);
        }
        return(0);
    }
コード例 #3
0
    /*
     * kinect video functions
     */

    public static int NuiImageStreamOpen(NuiImageType eImageType, NuiImageResolution eResolution, uint dwImageFrameFlags_NotUsed, uint dwFrameLimit, IntPtr hNextFrameEvent, ref IntPtr phStreamHandle)
    {
        return(0);
    }
コード例 #4
0
 public static int NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(NuiImageResolution eColorResolution, NuiImageResolution eDepthResolution, ref NuiImageViewArea pcViewArea, int lDepthX, int lDepthY, ushort sDepthValue, out int plColorX, out int plColorY)
 {
     plColorX = plColorY = 0;
     return(-1);
 }
コード例 #5
0
 public static extern int NuiImageResolutionToSize(NuiImageResolution eResolution,out uint frameWidth,out uint frameHeight);
コード例 #6
0
 public static extern int NuiImageStreamOpen(NuiImageType eImageType, NuiImageResolution eResolution, uint dwImageFrameFlags_NotUsed, uint dwFrameLimit, IntPtr hNextFrameEvent, ref IntPtr phStreamHandle);
コード例 #7
0
	public static int NuiImageStreamOpen(NuiImageType eImageType, NuiImageResolution eResolution, uint dwImageFrameFlags_NotUsed, uint dwFrameLimit, IntPtr hNextFrameEvent, ref IntPtr phStreamHandle)
	{
		if(eImageType == NuiImageType.DepthAndPlayerIndex)
			phStreamHandle =  GetDepthStreamHandle();
		else if(eImageType == NuiImageType.Color)
			phStreamHandle =  GetColorStreamHandle();
		else
			throw new Exception("Unsupported image type: " + eImageType);
		
		return 0;
	}
コード例 #8
0
 public static extern int NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(NuiImageResolution eColorResolution, NuiImageResolution eDepthResolution, ref NuiImageViewArea pcViewArea, int lDepthX, int lDepthY, ushort sDepthValue, out int plColorX, out int plColorY);
コード例 #9
0
ファイル: Kinect1Interface.cs プロジェクト: lukasIO/UnityMyo
    private bool NuiImageResolutionToSize(NuiImageResolution res, out int refWidth, out int refHeight)
    {
        switch( res )
        {
            case NuiImageResolution.resolution80x60:
                refWidth = 80;
                refHeight = 60;
                return true;
            case NuiImageResolution.resolution320x240:
                refWidth = 320;
                refHeight = 240;
                return true;
            case NuiImageResolution.resolution640x480:
                refWidth = 640;
                refHeight = 480;
                return true;
            case NuiImageResolution.resolution1280x960:
                refWidth = 1280;
                refHeight = 960;
                return true;
            default:
                refWidth = 0;
                refHeight = 0;
                break;
        }

        return false;
    }
コード例 #10
0
        public static extern void KinectEnableIRStream(KinectHandle handle, NuiImageResolution resolution,
		                                                ref KinectImageFrameFormat frameFormat);
コード例 #11
0
        public static extern void KinectEnableDepthStream(KinectHandle handle, bool nearMode, NuiImageResolution resolution,
		                                                   ref KinectImageFrameFormat frameFormat);
コード例 #12
0
 public static extern int NuiImageResolutionToSize(NuiImageResolution eResolution, out uint frameWidth, out uint frameHeight);
コード例 #13
0
 private static extern int NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(NuiImageResolution eColorResolution, NuiImageResolution eDepthResolution, ref NuiImageViewArea pcViewArea, int lDepthX, int lDepthY, ushort sDepthValue, out int plColorX, out int plColorY);