Comments (5)
Try the following patch on Sources\Imaging\Microsoft.Psi.Imaging\ImagePool.cs:
diff --git a/Sources/Imaging/Microsoft.Psi.Imaging/ImagePool.cs b/Sources/Imaging/Microsoft.Psi.Imaging/ImagePool.cs
index fcd9f449f..f5a20ed38 100644
--- a/Sources/Imaging/Microsoft.Psi.Imaging/ImagePool.cs
+++ b/Sources/Imaging/Microsoft.Psi.Imaging/ImagePool.cs
@@ -17,10 +17,10 @@ namespace Microsoft.Psi.Imaging
/// <param name="width">Width of image requested</param>
/// <param name="height">Height of image requested</param>
/// <param name="pixelFormat">Pixel format for requested image</param>
- /// <returns>Returns an image frmo the pool</returns>
+ /// <returns>Returns an image from the pool</returns>
public static Shared<Image> GetOrCreate(int width, int height, PixelFormat pixelFormat)
{
- return KeyedSharedPool<Image, ValueTuple<long, PixelFormat>>.GetOrCreate(ValueTuple.Create((long)(width * height), pixelFormat), () => Image.Create(width, height, pixelFormat));
+ return KeyedSharedPool<Image, ValueTuple<int, int, PixelFormat>>.GetOrCreate(ValueTuple.Create(width, height, pixelFormat), () => Image.Create(width, height, pixelFormat));
}
/// <summary>
from psi.
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:
graphics.ScaleTransform(xScale, yScale);
graphics.DrawImage(image.ToManagedImage(), new Point(0, 0)); \\ line that causes error
return ImagePool.GetOrCreate(bitmap);
from psi.
Thanks for the additional info. We'll investigate further and get back to you.
from psi.
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.
from psi.
Ahh okay, that corrects the issue for me. Thank you!
from psi.
Related Issues (20)
- Request to make Microsoft.Psi.MixedReality.StereoKitTransforms properties public HOT 3
- Troubles with RemoteImporter HOT 6
- Will the implementation of "Continual Learning about Objects in the Wild: An Interactive Approach" be opensource? HOT 2
- PSI on Oculus Quest (Android) HOT 4
- Publicizing StereoKitTransforms properties HOT 1
- `NullReferenceException` in MixedReality.cs HOT 1
- Thread-safety bug for the pipeline's stopping state HOT 1
- HoloLens 2 ir cam intrinsics HOT 4
- Fix missing project Microsoft.Psi.Audio.Windows in solution HoloLensCapture.sln
- \psi Studio's 3D panel not rendering properly when using the integrated GPU (but ok with an external monitor) HOT 1
- [Bug]: Hitting an exception when attempting to start hololenscaptureapp in hololens2 using VS2022 HOT 5
- Memory usage of SharedImagePool keeps growing HOT 3
- Poor Serialization Performance for the Diagnostics's `TrackMessageSize` HOT 4
- [Question] Subpipline stop without stopping parent pipline HOT 5
- .NET Native Support
- PsiStoreReader has an inconsistent output for indexed entries on different projects (DotNet vs. UWP) same x64 architecture HOT 2
- Could not load file or assembly 'Microsoft.Psi.Media_Interop.Windows.x64, Version=0.18.72.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. HOT 2
- PsiStudio not displaying correctly properties with new visualizers HOT 4
- Connecting windows C# and Ubuntu py with interop HOT 2
- If operator to compare to ip producer variables in order to send a specific frame HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psi.