-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resizing Kinect depth image causes error #17
Comments
Try the following patch on Sources\Imaging\Microsoft.Psi.Imaging\ImagePool.cs:
|
Error still occurs, unfortunately. In case it's helpful, the error is originating at line 216 of Microsoft.Psi.Imaging\Operators.cs, in the middle of this code block:
|
Thanks for the additional info. We'll investigate further and get back to you. |
The Resize operator does not work with the raw depth image format. In order to perform imaging operations on the depth stream, it should first be converted to a color or grayscale image like so: var depthImageStream = kinectSensor.DepthImage.ToGray().Resize(100, 100).EncodeJpeg(90, DeliveryPolicy.LatestMessage).Out; We should probably throw a more helpful exception than the underlying generic GDI+ error. |
Ahh okay, that corrects the issue for me. Thank you! |
The following code block generates a "generic GDI+ error":
The culprit seems to be the resize operation on the depth image stream - removing that stage resolves the issue.
The text was updated successfully, but these errors were encountered: