nywerwer 发表于 2018-10-12 18:11
虽然没有专门针对.NET Core的示例,但RealSense SDK 2.0在“csharp”类别的包装器中确实具有.NET Framework兼容性。
这个包装器的主页有一个C#示例程序,并链接到几个教程程序。
master上的librealsense / wrappers / csharp·IntelRealSense / librealsense·GitHub
我确实有.NET内核的半工作代码,但在尝试使用PointCloud时遇到了问题。
我使用Points.CopyTo得到了一个令人讨厌的丢失的DLL异常,并且正在寻找是否有其他人遇到了同样的问题,也许是如何解决它。
例外情况只发生在我的linuxplatform(Ubuntu 16.04)上,在Windows上按预期工作。
1)例外信息
*********************************************
异常类型:System.DllNotFoundException
消息:无法加载共享库'msvcrt.dll'或其依赖项之一。
为了帮助诊断加载问题,请考虑设置LD_DEBUG环境变量:libmsvcrt.dll:无法打开共享对象文件:没有这样的文件或目录
类型名:
数据:System.Collections.ListDictionaryInternal
TargetSite:IntPtr memcpy(IntPtr,IntPtr,Int32)
HelpLink:NULL
资料来源:Intel.RealSense
HResult:-2146233052
StackTrace信息
*********************************************
在Intel.RealSense.NativeMethods.memcpy(IntPtr dest,IntPtr src,Int32 count)
在Intel.RealSense.Points.CopyTo(Vertex []数组)
PointCloud pointCloud = new PointCloud(); Points points = pointCloud.Calculate(frames.DepthFrame); Points.Vertex [] vertices = new Points.Vertex [points.Count]; points.CopyTo(vertices);
以上来自于谷歌翻译
以下为原文
I do have have semi working code for the .NET core but have run into issues trying to use a PointCloud. I'm getting a nasty missing DLL exception using the Points.CopyTo and was looking to find out if any one else had run into the same problem and perhaps how to solve it. The exception only occurs on my linuxplatform (Ubuntu 16.04), on windows it works as intended.
1) Exception Information
*********************************************
Exception Type: System.DllNotFoundException
Message: Unable to load shared library 'msvcrt.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libmsvcrt.dll: cannot open shared object file: No such file or directory
TypeName:
Data: System.Collections.ListDictionaryInternal
TargetSite: IntPtr memcpy(IntPtr, IntPtr, Int32)
HelpLink: NULL
Source: Intel.RealSense
HResult: -2146233052
StackTrace Information
*********************************************
at Intel.RealSense.NativeMethods.memcpy(IntPtr dest, IntPtr src, Int32 count)
at Intel.RealSense.Points.CopyTo(Vertex[] array)
|
PointCloud pointCloud = new PointCloud(); |
|
Points points = pointCloud.Calculate(frames.DepthFrame); |
|
Points.Vertex[] vertices = new Points.Vertex[points.Count]; |
|
points.CopyTo(vertices); |