SimpleOpenNI记录和重播用户跟踪数据 [英] SimpleOpenNI Record and Replay User Tracking Data

查看:151
本文介绍了SimpleOpenNI记录和重播用户跟踪数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用SimpleOpenNI成功录制和重放深度和rgb录音(.oni文件)。我还希望能够从录制的文件中跟踪用户,换句话说,能够从深度图像中轻松提取人物的sillhouettes。通过在 setup()中调用 enableUser(),在运行连接到传感器时使用SimpleOpenNI很容易做到这一点方法,然后在绘制调用期间获取 userMap() userImage()。这样做的动机是能够轻松地从背景中分割出一个人的sillouhette。我使用的是SimpleOpenNI版本1.96。

I am able to use SimpleOpenNI to successfully record and replay depth and rgb recordings (.oni files). I would also like to be able to track users from recorded files, in other words be able to easily extract sillhouettes of people from a depth image. This is easy to do with SimpleOpenNI when running connected to a sensor, by calling enableUser() in the setup() method, and then obtaining userMap() or userImage() during draw calls. The motivation for this is to be able to easily segment out a person's sillouhette from a background. I am using SimpleOpenNI version 1.96.

以下是我在记录数据时使用的代码:

Here is the code I am using when record data:

SimpleOpenNI context;
public void setup()
{       
    context = new SimpleOpenNI(this);

    // recording
    context.enableDepth();  
    context.enableRGB();
    context.enableUser();
    context.enableRecorder(recordPath);

    // select the recording channels
    context.addNodeToRecording(SimpleOpenNI.NODE_DEPTH,true);
    context.addNodeToRecording(SimpleOpenNI.NODE_IMAGE,true);
    context.addNodeToRecording(SimpleOpenNI.NODE_USER, true);
    context.addNodeToRecording(SimpleOpenNI.NODE_PLAYER, true);
    context.addNodeToRecording(SimpleOpenNI.NODE_SCENE, true);
    context.addNodeToRecording(SimpleOpenNI.NODE_IR, true);
}

以下是我用来重播数据的代码:

Here is the code I am using to replay data:

SimpleOpenNI context;
String recordPath = "/path/to/test.oni";
public void setup()
{       
context = new SimpleOpenNI(this,recordPath);
    context.enableDepth();
    context.enableRGB();
    context.enableUser();
}
...

方法调用 context.enableUser(); 当我尝试重放数据时导致错误无法获取XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE位置0x4c rip = 0x10e2c38e2 的无效内存访问。但是,我知道为了获取有关正在跟踪哪些用户的信息,我需要调用 context.enableUser()。删除此行会删除错误,但不允许我访问有关正在跟踪哪些用户的信息。

The method call context.enableUser(); when I attempt to replay the data causes the error Couldn't getXN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE Invalid memory access of location 0x4c rip=0x10e2c38e2. However, I know that in order to obtain information about which users are being tracked, I need to call context.enableUser(). Removing this line removes the error but does not allow me to access information about which users are being tracked.

是否有人知道是否可以跟踪预先录制的用户 .oni files?

Does anybody know if it is possible to track users from pre-recorded .oni files?

推荐答案

是的,旧版本可以SimpleOpenNI。

Yes, it was possible in older versions of SimpleOpenNI.

但是在没有错误的版本1.96中它是不可能的。

有一个错误报告(参见Google项目页面中的问题103)我添加了评论的链接,因为我不能在声誉太少的答案中发布更多链接。)提到这一点。

But it's not possible in version 1.96 without the error.
There is a bug report (See issue 103 in the Google project page. I added the link to the comments, since I can't post more links in answers with too little reputation.) that mentions this.

但有一种方法可以在旧版本的SimpleOpenNI中记录 .oni 文件并使用它们跟踪版本1.96中的用户:

我设法记录 userMap()安装 SimpleOpenNI 0.27 ,继续之后e 旧安装指南并使用Processing 1.5.1和RecorderPlay示例附带SimpleOpenNI 0.27。

然后我可以在SimpleOpenNI 1.96和Processing 2.2.1中回放 .oni 文件来检索用户地图和骨架数据。

But there is a way to record .oni files in an older version of SimpleOpenNI and use them to track users in version 1.96:
I managed to record userMap() data by installing SimpleOpenNI 0.27, following the old installation guide and using Processing 1.5.1 and the RecorderPlay example that comes with SimpleOpenNI 0.27.
I was then able to play back the .oni file in SimpleOpenNI 1.96 and Processing 2.2.1 to retrieve userMap and skeleton data.

我使用的是Mac Book Pro Retina和OS X 10.9.4。

I am using a Mac Book Pro Retina and OS X 10.9.4.

这篇关于SimpleOpenNI记录和重播用户跟踪数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆