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);
    }
Beispiel #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);
    }
Beispiel #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);
    }
Beispiel #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);
 }
 public static extern int NuiImageResolutionToSize(NuiImageResolution eResolution,out uint frameWidth,out uint frameHeight);
 public static extern int NuiImageStreamOpen(NuiImageType eImageType, NuiImageResolution eResolution, uint dwImageFrameFlags_NotUsed, uint dwFrameLimit, IntPtr hNextFrameEvent, ref IntPtr phStreamHandle);
	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;
	}
 public static extern int NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(NuiImageResolution eColorResolution, NuiImageResolution eDepthResolution, ref NuiImageViewArea pcViewArea, int lDepthX, int lDepthY, ushort sDepthValue, out int plColorX, out int plColorY);
Beispiel #9
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;
    }
        public static extern void KinectEnableIRStream(KinectHandle handle, NuiImageResolution resolution,
		                                                ref KinectImageFrameFormat frameFormat);
        public static extern void KinectEnableDepthStream(KinectHandle handle, bool nearMode, NuiImageResolution resolution,
		                                                   ref KinectImageFrameFormat frameFormat);
Beispiel #12
0
 public static extern int NuiImageResolutionToSize(NuiImageResolution eResolution, out uint frameWidth, out uint frameHeight);
 private static extern int NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution(NuiImageResolution eColorResolution, NuiImageResolution eDepthResolution, ref NuiImageViewArea pcViewArea, int lDepthX, int lDepthY, ushort sDepthValue, out int plColorX, out int plColorY);