What's the timestamp actually mean ?

元ネタ

RelativeTime ってなに?

KINECT SDKで取得できる各Frame(body, color, depth, infrared)にはそれぞれ RelativeTime というプロパティが存在するのですが、その説明がbody, color, depthとinfraredでは異なっているので、その違いは何?そもそも the timestamp of the frame ってどういうタイミング?という質問です。

質問者は「MSDNには "Gets the timestamp of the * frame" (body, color, depth フレーム) と "Gets the source of the ** frame"(infrared フレーム)があるよ」と主張しています。 僕がMSDNを確認した限り、RelativeTimeの表記は以下のもので統一されているようでした。

Gets the timestamp of the (body | color | depth | infrared) frame.

確かにどのタイミング?

ですが、確かに the timestamp of the frame と言われてもどのタイミングかはよく分かりません。
KINECTが各フレームの元となる情報を取得したタイミングなのか、それぞれのフレームのインスタンスが作成されたタイミングなのか、もっと別のタイミングなのか…。

中の人の回答はこんな感じです。

The timestamp is just a reference time value for the frame. You cannot deduce anything from it other than it is a uniquely timed value in relation to the Kinect runtime. The value represents a TimeSpan value that is measured in 100ns increments.

Its uses can be to determine delta time between frames to ensure you are getting 30fps(or 15fps color) since the delta should be 33ms. Also, if you are comparing against depth/ir/body data and the color frames if there is a large delta to know if the color frame is ahead or behind the current frame you are analyzing.

うーん、よく分かりませんがそれぞれのフレームの中の異なるタイミングで、それぞれのリソースを取得しているのでどっちが先に取られたものか?を判断するための相対時間だよという感じでしょうか。

ちなみに

完全に同じタイミングで生成されたフレームを取得したい(たとえば、全く同じタイムスタンプをもつColorフレームとDepthフレームのセットがほしい)というのは結構みんな考えるようです。

I want to know the exactly when the Kinect gives depth frame and color frame in a period of one frame

現状では MultiSourceFrame を使うのが一番良い方法といえます。自前でColorとDepthを別々のスレッドにして同期させることも不可能ではないですが、MultiSourceFrame を凌ぐ精度を出すことはかなり難しいとのコメントでした。