MATLAB: How to connect microsoft kinect studio as kinect v2

.xef.xef image acquisitionimage acquisitionkinectkinect studiokinect v2

So, I have videos from a Kinect v2 (.XEF). I know that when I open then o Kinect studio I can access on c#/c++ applications as a Kinect v2 camera. But, using the support package for Kinect in MATLAB does not see it as if there is a Kinect v2 camera. There is anything that can be done so MATLAB recognize the Kinect Studio device connection?

Best Answer

I've found the solution my self. First some comments:
The matlab support package does not recognize the Kinect Studio connection as a camera. Thus, when I initialize the Kinect v2 camera object on matlab it is a just an empty object. That even if there is an open .XEF video playing on Kinect studio with an open connection.
The solution I've found: Kinect SDK has this functionality to open .XEF as an emulated Kinect camera, as like Kinect Studio. Thus I can use this on my C++ applications. That is great for development, because I don't need to have a Kinect camera connect to my PC all the time.
Thus the solution was to create mex wrapper on c++ code that access the Kinect v2 connection and it's functionalities trough the Kinect SDK. While doing my own wrapper I found Kin2-Kinect wrapper by Juan R. Terven. This was agreat starting point, lac some of the functionalities I want, but has more than I need too. Then, I built my application based on this.