安装我的Visual Studio设置项目后,Kinect摄像头无法正常工作

发布于 2025-01-24 00:07:49 字数 1368 浏览 3 评论 0原文

我在Visual Studio中有一个使用Microsoft Azure Kinect摄像头的项目。当我调试时,我的程序运行得很好,我可以安装它。但是,当我尝试运行应用程序时,Kinect摄像头有例外。安装后,所有DLL似乎都出现在应用程序文件中,因此我不知道问题可能是什么。我知道相机已正确连接,因为它以调试模式运行。我必须在设置项目中手动添加一些DLL,但是我在整个文件夹上复制了,所以我认为没有任何东西我缺少任何东西。这些dll我仅像其他文件一样添加了弹出式的弹出式文件,但我尝试将它们添加为汇编文件,但它们仍然以普通文件类型的形式弹出。

我的项目中有一个名为OpenGL的文件夹,其中包括这些文件 https://github.com/microsoft/azure-kinect-samples/tree/master/master/body-tracking-samples/csharp_3d_viewer

我可能会添加的另一个注意。它不安装在程序文件中。不确定这是否会导致任何问题,但我不是管理员,因此它不会让我在那里安装我的应用程序。

这是代码的一部分,错误似乎正在发生:

 // setup the Sensor calibration
    m_SensorCalibration = m_Device.GetCalibration();
    try
    {
        // Setup the caching area for points found while tracking
        PointCloud.ComputePointCloudCache(m_Device.GetCalibration());
    }
    catch (Exception e)
    {
        String alertMsg = e.ToString();
        String alertTitle = "Compute Point Cloud Cache failed.";
        MessageBox.Show(alertMsg, alertTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
    }

这是安装和试图运行应用程序后弹出的内容。

I have a project in Visual Studio that uses the Microsoft Azure Kinect Camera. My program runs perfectly fine when I debug it and I can install it just fine. However, when I try to run my application, there is an exception for the Kinect camera. All the DLLs seem to appear in the application's files after installation, so I have no idea what the issue could be. I know the camera is connected properly because it runs in debug mode. There are a few DLLs I had to add manually into the file system in the setup project, but I copied over the whole folder so I don't think there is anything I am missing. These DLLs I added pop up as just files and not assembly files like the other ones, but I tried adding them as assembly files and they still popped up as normal file types.

I have a folder within my project called OpenGL which includes these files https://github.com/microsoft/Azure-Kinect-Samples/tree/master/body-tracking-samples/csharp_3d_viewer

Another note I might add is that my program installs just on the C: drive. It does not install in Program Files. Not sure if this causes any issues, but I am not an administrator so it won't let me install my application there.

This is the portion of code the error seems to be happening:

 // setup the Sensor calibration
    m_SensorCalibration = m_Device.GetCalibration();
    try
    {
        // Setup the caching area for points found while tracking
        PointCloud.ComputePointCloudCache(m_Device.GetCalibration());
    }
    catch (Exception e)
    {
        String alertMsg = e.ToString();
        String alertTitle = "Compute Point Cloud Cache failed.";
        MessageBox.Show(alertMsg, alertTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
    }

This is what pops up after installing and trying to run the application.
Picture of Error Message

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

她比我温柔 2025-01-31 00:07:49

Kinect的添加dll包括一个称为k4a.dll的dll。是635kb。我决定将文件大小与应用程序的较旧版本进行比较,并发现该旧文件为637KB。我用旧版本替换了文件,重建了安装程序,安装了我的应用程序,并且可以使用!

The added dlls for the kinect included one called k4a.dll. It was 635KB. I decided to compare my file sizes to an older version of my application and saw that this older file was 637KB. I replaced my file with the older version, rebuilt the installer, installed my application, and it works!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文