none
Using Kinect v2 in Matlab Image Acquisition Tool RRS feed

  • Question

  • Hi,

    I want to use the new Kinect v2 sensor in Matlab, but the info = imaqhwinfo doesn't show me Kinect among InstalledAdaptors. I've already used Kinect v2 as webcam in Skype and it works properly, but in Windows  "Control Panel->Device Manager" Kinect doesn't appear as a "Imaging Device".

    Does anyone known how to configure Kinect as a Imaging Device (in order to use it as a classical webcam)?

    In this way, also if Matlab doesn't support all new Kinect functionalities yet (as I've read from http://www.mathworks.com/matlabcentral/answers/146494-matlab-support-for-microsoft-kinect-for-windows-v2), I could use it like a classical webcam.

    Thanks in advance!

    Wednesday, September 3, 2014 10:20 AM

All replies

  • Kinect is not a Windows camera device. You have to write a bridge or application that can incorporate the Kinect and MATLAB api's in one.

    There was a thread where someone was using the Kinect Common Bridge library as a way to get frame data into their applications using Matlab scripting environment if that is an option for you.

    http://social.msdn.microsoft.com/Forums/en-US/2aa59712-c2ab-48e2-98bd-5eed9a40ec44/matlab-link?forum=kinectv2sdk


    Carmine Sirignano - MSFT

    Tuesday, September 9, 2014 6:19 PM
  • I try to use Kinect Common Bridge following your link instructions, but when I do

    loadlibrary('Kinect20.dll',hfile1)

    I get the following error in Matlab Command Window:

    Error using loadlibrary (line 419)
    Building Kinect20_thunk_pcwin64 failed.  Compiler output is:
    cl -I"C:\Program Files\MATLAB\R2012a\extern\include"   /W3  /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0
    /nologo  -I"C:\Program Files\MATLAB\R2012a\bin" -I"C:\Program Files\Microsoft SDKs\Kinect\v2.0-PublicPreview1408\inc"
    "Kinect20_thunk_pcwin64.c" -LD -Fe"Kinect20_thunk_pcwin64.dll"
    Kinect20_thunk_pcwin64.c

    and also a list of syntax errors in 'Kinect.h' and 'Kinect.INPC.h'.

    With

    mex -setup

    I've chosen Microsoft Visual Studio 2010 as compiler.

    What's wrong in my process?

    Thanks in advance!

     

    Tuesday, September 16, 2014 8:35 AM
  • You cannot use VS2010, you must use VS2012 or 2013.

    Carmine Sirignano - MSFT

    Tuesday, September 16, 2014 7:18 PM
  • I know that I must use VS2012 or 2013, but 

    mex -setup

    show me only these compilers:

    Select a compiler: 
    [1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker) 
    [2] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker) 
    [3] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker) 
    [4] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker) 
    [5] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker) 
    [6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker) 
    [7] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker) 
    [8] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker) 
    [9] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker) 
    [10] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) 
    [11] Microsoft Software Development Kit (SDK) 7.1 
    [12] Microsoft Visual C++ 2005 SP1 
    [13] Microsoft Visual C++ 2008 SP1 
    [14] Microsoft Visual C++ 2010 

    How to add VS2012 or 2013 to that list?

    Thanks!

    Wednesday, September 17, 2014 8:00 AM
  • That looks to be a Matlab specific question where you might get a quicker response from Mathworks support.

    Carmine Sirignano - MSFT

    Wednesday, September 17, 2014 5:12 PM
  • The Kinect v2 is now supported with release R2016a. You can get it by downloading the Kinect for Windows Sensor support package after installing MATLAB and the Image Acquisition toolbox.
    Friday, March 11, 2016 7:37 PM