1

我正在尝试使用 backgroundworker 对 Kinect 骨架帧的一些繁重处理进行多线程处理。

但是,当我在后台工作人员中调用传感器的 CoordinateMapper 时,我得到了 FailedQI 异常,HRESULT : 0x80004002 (E_NOINTERFACE)。

据我目前的理解,这似乎是因为我正在访问一个未在我的后台工作人员中初始化的资源。

导致异常发生的代码:

protected static Point SkeletonPointToScreen(SkeletonPoint skelpoint)
    {
        KinectSensor sensor = KinectSensorProvider.ProvideSensor();

        ColorImagePoint colorPoint = sensor.CoordinateMapper.MapSkeletonPointToColorPoint(skelpoint, ColorImageFormat.RgbResolution640x480Fps30);
        return new Point(colorPoint.Y, colorPoint.X);
    }

我不明白如何克服这个问题。我试图将 CoordinateMapper 对象作为参数发送给我的后台工作人员,但没有成功。

4

0 回答 0