Want to get kinect running for music live visuals - in great need of help

Hi,

so, short selfdescription: HTML/CSS/JS savvy musician bought new Kinect v2 (“hah it’s a lot better”) to create some livevisuals. Naturally, I expected plug and play ready software (plugins) for vj software. Came home, installed the SDK and Kinect Studio. That was my last successful step.

I tried codeblocks on OS X, Windows and Visual Studio Express 2012 on Windows which I’m trying right now. I downloaded openframeworks addons for Kinect (ofxKinectForWindows2 and ofxKinect2), trying the first on my own and the latter following one of the not out of the date tutorials I managed to find: http://rbarraza.com/using-ofxkinectv2-with-of/

I couldn’t Debug (or Release) either the test included in the ofxKinectForWindows2 or the test file I created according to the tutorial in the link. I tried several variants which made sense to me. The last try fails because a MSVCP120.dll is missing. WTF, I thought I’m using 2012 (120.dll seems to be for 2013) and before it failed on other weird messages which I managed to get rid of. I followed the instructions in the tutorial exactly and set up the project right. There was already mistakes I took care of. I need to mention that I installed a lot of software hoping for something which saves my ass and provides a quick solution. I feel like I need to be much more precise with everything here. Last thing I tried is to port the code from the example in ofxKinectv2 to my Visual Studio from the Project Generator. It fails at the same step while trying to run.

ofApp.h:

#pragma once

#include "ofMain.h"
#include "ofxKinectCommonBridge.h"

class ofApp : public ofBaseApp{

	public:
		void setup();
		void update();
		void draw();

		ofxKinectCommonBridge kinect;
		
};

ofApp.cpp:

#include "ofApp.h"

void ofApp::setup(){
kinect.initSensor();
kinect.initColorStream();
kinect.start();
}

void ofApp::update(){
kinect.update();
}

void ofApp::draw(){
kinect.draw(0,0);
}

Debug Output:

'mySketch_debug.exe' (Win32): Loaded 'C:\openframeworks\apps\myApps\mySketch\bin\mySketch_debug.exe'. Symbols loaded.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\openframeworks\apps\myApps\mySketch\bin\KCBv2.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110d.dll'. Symbols loaded.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110d.dll'. Symbols loaded.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msimg32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\openframeworks\apps\myApps\mySketch\bin\FreeType-6.dll'. Module was built without symbols.
'mySketch_debug.exe' (Win32): Loaded 'C:\openframeworks\apps\myApps\mySketch\bin\FreeImage.dll'. Module was built without symbols.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\openframeworks\apps\myApps\mySketch\bin\fmodex.dll'. Module was built without symbols.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'mySketch_debug.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Kinect20.dll'. Cannot find or open the PDB file.
First-chance exception at 0x77B98F05 (ntdll.dll) in mySketch_debug.exe: 0xC0000135: Unable to Locate DLL.
Unhandled exception at 0x77B98F05 (ntdll.dll) in mySketch_debug.exe: 0xC0000135: Unable to Locate DLL.
The thread 0xf6c has exited with code -1073741510 (0xc000013a).
The program '[4880] mySketch_debug.exe' has exited with code -1073741510 (0xc000013a).

I’m frustrated, I also can only guess a little bit where this will be going. Anyway, I’m also hooked and would like to get all the options out of this since I’m very drawn to audio visualization influenced by performance and this seems like fun, nevermind the frustration, I’m motivated. If someone could help me out on the following questions:

What are the best prerequisites to reach my goals which would be to use the Kinect with a VJ tool like vvvv or vdmx or resolume (I only researched this software, I have no idea how to use it) or how to create a more user friendly enviroment for me to try to use the sensor.
I’d rather stay with OS X but thought it’s not the best idea since most people mentioned it’s only working with Windows 8 which I’m using now. It might be a huge jump but I have no idea where to begin. Maybe I should clean up my Windows and reinstall all software which I will want to use to ensure a clean start? Or is it possible to use OS X in my projects and stay out of Windows?
Maybe I will need to get into much more basic stuff, and if, are there some recommended resources which are kind of aligned to my goals? I’m kind of a fiddler and patient with google. I can kind of read my way around but here much more can fail than just code, so is my feeling.

Thanks a lot for reading and help, happy new year

Best

Hi Mirosu,

First, I wan’t to support you in your quest, because I’m sure we can do very nice visual performance with Kinect. And you look motivated.

But I can’t help you in your specific problem because i’m work with Xcode. And if you’re not a advanced developer and Object class friendly, I think it’s really hard to start with OF and Kinect : if you spend time to run some example find on the web and cannot modify them or create something with, I think you are in the wrong way.

If you really wish create your own tool, start learning OF, create some basic visual effect, add midi connexion and after add Kinect… but you need time to learn OF syntax, Object Class, programing…

Else, you can find tool that already exist and experiment with them…
I suggest you http://z-vector.com/ it looks to be what you’re looking for.

sorry for your problems.

I’ve had good luck with this approach – having an app talk to the kinect and send skeleton data over OSC. I have a built version of the broadcaster app if it’s helpful that sends to 127.0.0.1 – happy to upload:

and happy to walk you through any steps…

regarding your crash, the PDB things are normal warnings, that’s just complaining about not finding debug symbols, but the other error seems more related to a misconfiguraiton. First, if you compile any OF example does it work ? (open the solution file for one of the examples and try to compile it). Next, you might look at similar errors like : http://stackoverflow.com/questions/26979336/unable-to-locate-dll
Dependancy walker is your friend when it comes to DLL errors.

Finally, if you post a zip of your entire project plus any necessary addons I’m happy to take a look.

1 Like

Thanks a lot guys! I started doing some tests in xcode and of course debugging and releasing (do you call it like that?) is working just fine. So far, I feel very at home with openframeworks. Bummer how the start problems made me panic. I think I will be doing some more stuff on OS X before maybe switching back to Windows and work on the kinect since this is very interesting by itself and it would be good to know my way around.
Then I will be also happy to accept your very nice offer zach!

Thanks again.

z-vector is for the old sensor unfortunately.

Edit: So I’ve been trying to launch ofxKinectv2 https://github.com/ofTheo/ofxKinectV2
I installed OpenCV like described here: http://blogs.wcode.org/2014/10/howto-install-build-and-use-opencv-macosx-10-10/
I’ve created a project with the project generator, added ofxGui and ofxKinectV2 and also added the /usr/local/include under the header search paths. I’ve added the files out of the example into that project.
I will research later how to flash my Kinect since I oversaw that line. Still this is showing up, is it because of this? I would guess not.

clang: warning: -lpthread: 'linker' input unused
/Users/miloslukacek/Documents/openframeworks/addons/ofxKinectV2/libs/protonect/ofProtonect.cpp:348:31: warning: comparison of constant 128 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
      printf("%c",(((c<32)||(c>128))?'.':c));
                             ~^~~~
1 warning generated.    

Ld bin/KinectTest.app/Contents/MacOS/KinectTest normal i386
        cd /Users/miloslukacek/Documents/openframeworks/apps/myApps/KinectTest
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/miloslukacek/Documents/openframeworks/apps/myApps/KinectTest/bin -F/Users/miloslukacek/Documents/openframeworks/apps/myApps/KinectTest/bin -F/Users/miloslukacek/Documents/openframeworks/apps/myApps/KinectTest/../../../libs/glut/lib/osx -filelist /Users/miloslukacek/Library/Developer/Xcode/DerivedData/KinectTest-duufswkojtwwpndahogevhlvedar/Build/Intermediates/KinectTest.build/Release/KinectTest.build/Objects-normal/i386/KinectTest.LinkFileList -dead_strip ../../../libs/poco/lib/osx/PocoCrypto.a ../../../libs/poco/lib/osx/PocoData.a ../../../libs/poco/lib/osx/PocoDataODBC.a ../../../libs/poco/lib/osx/PocoDataSQLite.a ../../../libs/poco/lib/osx/PocoFoundation.a ../../../libs/poco/lib/osx/PocoNet.a ../../../libs/poco/lib/osx/PocoNetSSL.a ../../../libs/poco/lib/osx/PocoUtil.a ../../../libs/poco/lib/osx/PocoXML.a ../../../libs/poco/lib/osx/PocoZip.a ../../../libs/tess2/lib/osx/tess2.a ../../../libs/glew/lib/osx/glew.a ../../../libs/cairo/lib/osx/cairo-script-interpreter.a ../../../libs/cairo/lib/osx/cairo.a ../../../libs/cairo/lib/osx/pixman-1.a ../../../libs/fmodex/lib/osx/libfmodex.dylib ../../../libs/rtAudio/lib/osx/rtAudio.a ../../../libs/openssl/lib/osx/crypto.a ../../../libs/openssl/lib/osx/ssl.a ../../../libs/glfw/lib/osx/libglfw3.a ../../../libs/FreeImage/lib/osx/freeimage.a ../../../libs/freetype/lib/osx/freetype.a ../../../addons/ofxKinectV2/libs/libusb/lib/osx/usb-1.0.0-superspeed.a -stdlib=libstdc++ -framework Accelerate -framework QTKit -framework GLUT /Users/miloslukacek/Documents/openframeworks/libs/openFrameworksCompiled/lib/osx/openFrameworks.a -framework AGL -framework ApplicationServices -framework AudioToolbox -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework QuickTime -framework AppKit -framework Cocoa -framework IOKit -framework CoreVideo -Xlinker -dependency_info -Xlinker /Users/miloslukacek/Library/Developer/Xcode/DerivedData/KinectTest-duufswkojtwwpndahogevhlvedar/Build/Intermediates/KinectTest.build/Release/KinectTest.build/Objects-normal/i386/KinectTest_dependency_info.dat -o /Users/miloslukacek/Documents/openframeworks/apps/myApps/KinectTest/bin/KinectTest.app/Contents/MacOS/KinectTest
    
    Undefined symbols for architecture i386:
      "cv::Mat::create(int, int const*, int)", referenced from:
          cv::Mat libfreenect2::loadTableFromFile<float>(std::string const&) in cpu_depth_packet_processor.o
      "cv::getTickCount()", referenced from:
          libfreenect2::CpuDepthPacketProcessor::process(libfreenect2::DepthPacket const&) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessorImpl::stopTiming() in cpu_depth_packet_processor.o
      "cv::Mat::zeros(int, int, int)", referenced from:
          libfreenect2::CpuDepthPacketProcessor::process(libfreenect2::DepthPacket const&) in cpu_depth_packet_processor.o
      "cv::flip(cv::_InputArray const&, cv::_OutputArray const&, int)", referenced from:
          libfreenect2::CpuDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, unsigned long) in cpu_depth_packet_processor.o
          cv::Mat libfreenect2::loadTableFromFile<float>(std::string const&) in cpu_depth_packet_processor.o
      "cv::Mat::copySize(cv::Mat const&)", referenced from:
          libfreenect2::CpuDepthPacketProcessor::loadXTableFromFile(char const*) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessor::loadZTableFromFile(char const*) in cpu_depth_packet_processor.o
          cv::Mat libfreenect2::loadTableFromFile<float>(std::string const&) in cpu_depth_packet_processor.o
      "cv::_InputArray::_InputArray(cv::Mat const&)", referenced from:
          libfreenect2::CpuDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, unsigned long) in cpu_depth_packet_processor.o
          cv::Mat libfreenect2::loadTableFromFile<float>(std::string const&) in cpu_depth_packet_processor.o
      "cv::_OutputArray::_OutputArray(cv::Mat&)", referenced from:
          libfreenect2::CpuDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, unsigned long) in cpu_depth_packet_processor.o
          cv::Mat libfreenect2::loadTableFromFile<float>(std::string const&) in cpu_depth_packet_processor.o
      "cv::Mat::deallocate()", referenced from:
          libfreenect2::CpuDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, unsigned long) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessor::loadXTableFromFile(char const*) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessor::loadZTableFromFile(char const*) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessor::process(libfreenect2::DepthPacket const&) in cpu_depth_packet_processor.o
          cv::Mat libfreenect2::loadTableFromFile<float>(std::string const&) in cpu_depth_packet_processor.o
          cv::MatExpr::~MatExpr() in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessorImpl::~CpuDepthPacketProcessorImpl() in cpu_depth_packet_processor.o
          ...
      "cv::getTickFrequency()", referenced from:
          libfreenect2::CpuDepthPacketProcessorImpl::stopTiming() in cpu_depth_packet_processor.o
      "cv::fastFree(void*)", referenced from:
          libfreenect2::CpuDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, unsigned long) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessor::loadXTableFromFile(char const*) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessor::loadZTableFromFile(char const*) in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessor::process(libfreenect2::DepthPacket const&) in cpu_depth_packet_processor.o
          cv::Mat libfreenect2::loadTableFromFile<float>(std::string const&) in cpu_depth_packet_processor.o
          cv::MatExpr::~MatExpr() in cpu_depth_packet_processor.o
          libfreenect2::CpuDepthPacketProcessorImpl::~CpuDepthPacketProcessorImpl() in cpu_depth_packet_processor.o
          ...
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

It looks like you are missing the opencv addon?

In fact - I downloaded some OpenCV2 Add On and had it included instead of that. Finally got it running, thanks!
So now a general Kinect question:
What are the possibilities with the Kinect xbox One and also especially under OS X?
ofxKinectV2 brought Depth and Picture Data but how can I find more? What would the next step be, if, let’s say I would want to try to rebuild this interesting posting : https://translate.google.de/translate?hl=de&sl=ja&tl=en&u=http%3A%2F%2Fblog.rettuce.com%2Fmediaart%2Fkinect_of_delaunay%2F

If I got it right, he doesn’t use more than the depth data but for sure with different functions inside the old addon.

My guess right now is that I will need to switch back to Windows since the thread to the ofXKinectv2 states that skeletons are out of question - hence your OSC stream I guess - and not to expect much, how I understood it.