none
Kinect Video Stream and 320x240 resolution RRS feed

  • Question

  • I've tried to get a video at resolution 640x480 and that succeeds. However, I wanted to get lower resolution video of 320x240.

     

    An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Research.Kinect.dll 
    Additional information: Failed in native DLL. HRESULT=0x80070057.

    What does this error mean? Is it possible to get the lower resolution video?

     

    Monday, July 25, 2011 2:30 AM

Answers

  • According to the SDK reference, only NUI_IMAGE_RESOLUTION_1280x1024 and NUI_IMAGE_RESOLUTION_640x480 are supported for the color image. So I would think you can't get a lower resolution video directly from the SDK.
    Monday, July 25, 2011 1:22 PM
  • Xiyu is correct. The resolution you want is not supported. See documentation for NuiImageStreamOpen (C++) in KinectSDK.chm installed into <Program Files>\Microsoft Research KinectSDK\docs, or use ImageStream.GetValidResolution method (C#) to query for supported resolutions.

    Eddy


    I'm here to help
    Tuesday, July 26, 2011 8:21 AM

All replies

  • According to the SDK reference, only NUI_IMAGE_RESOLUTION_1280x1024 and NUI_IMAGE_RESOLUTION_640x480 are supported for the color image. So I would think you can't get a lower resolution video directly from the SDK.
    Monday, July 25, 2011 1:22 PM
  • Xiyu is correct. The resolution you want is not supported. See documentation for NuiImageStreamOpen (C++) in KinectSDK.chm installed into <Program Files>\Microsoft Research KinectSDK\docs, or use ImageStream.GetValidResolution method (C#) to query for supported resolutions.

    Eddy


    I'm here to help
    Tuesday, July 26, 2011 8:21 AM
  • Thanks for the answer. I managed to decrease the size in memory of the image by jpeg compression instead.

     

          ImageFrame _videoFrame = nui.VideoStream.GetNextFrame(0);
    
          Bitmap I = _videoFrame.Image.Bits.ToBitmap(640, 480);
    
          using (MemoryStream ms = new MemoryStream())
          {
            // Save to memory using the Jpeg format
            I.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
    
            // send the stream
            Sck.sendStream(ms);
          }

    Tuesday, July 26, 2011 8:25 AM