robbeofficial / kinecttouch Goto Github PK
View Code? Open in Web Editor NEWTurns any surface into a giant touchpad using kinect
Turns any surface into a giant touchpad using kinect
I've managed to solve some issues while trying to 'make' the KinectTouch, but I can't get through this one:
../src/KinectTouch.cpp:76: error: ‘Mat1s’ was not declared in this scope
../src/KinectTouch.cpp:76: error: template argument 1 is invalid
../src/KinectTouch.cpp:76: error: template argument 2 is invalid
../src/KinectTouch.cpp:76: error: ‘Mat1s’ has not been declared
../src/KinectTouch.cpp: In function ‘void average(int&, int&)’:
../src/KinectTouch.cpp:77: error: ‘Mat1d’ was not declared in this scope
../src/KinectTouch.cpp:77: error: expected ;' before ‘acc’ ../src/KinectTouch.cpp:78: error: expected
;' before ‘frame’
../src/KinectTouch.cpp:80: error: request for member ‘size’ in ‘frames’, which is of non-class type ‘int’
../src/KinectTouch.cpp:81: error: invalid types ‘int[unsigned int]’ for array subscript
../src/KinectTouch.cpp:81: error: ‘frame’ was not declared in this scope
../src/KinectTouch.cpp:82: error: ‘acc’ was not declared in this scope
../src/KinectTouch.cpp:85: error: ‘acc’ was not declared in this scope
../src/KinectTouch.cpp:85: error: request for member ‘size’ in ‘frames’, which is of non-class type ‘int’
../src/KinectTouch.cpp: In function ‘int main()’:
../src/KinectTouch.cpp:112: error: ‘Mat1s’ was not declared in this scope
../src/KinectTouch.cpp:112: error: expected ;' before ‘depth’ ../src/KinectTouch.cpp:113: error: ‘Mat1b’ was not declared in this scope ../src/KinectTouch.cpp:113: error: expected
;' before ‘depth8’
../src/KinectTouch.cpp:114: error: ‘Mat3b’ was not declared in this scope
../src/KinectTouch.cpp:114: error: expected ;' before ‘rgb’ ../src/KinectTouch.cpp:116: error: expected
;' before ‘debug’
../src/KinectTouch.cpp:118: error: expected ;' before ‘foreground’ ../src/KinectTouch.cpp:119: error: expected
;' before ‘foreground8’
../src/KinectTouch.cpp:121: error: expected ;' before ‘touch’ ../src/KinectTouch.cpp:123: error: expected
;' before ‘background’
../src/KinectTouch.cpp:124: error: ‘Mat1s’ cannot appear in a constant-expression
../src/KinectTouch.cpp:124: error: template argument 1 is invalid
../src/KinectTouch.cpp:124: error: template argument 2 is invalid
../src/KinectTouch.cpp:124: error: invalid type in declaration before ‘(’ token
/System/Library/Frameworks/opencv.framework/Headers/highgui.hpp:53: error: too few arguments to function ‘void cv::namedWindow(const std::string&, int)’
../src/KinectTouch.cpp:138: error: at this point in file
../src/KinectTouch.cpp:147: error: ‘depth’ was not declared in this scope
../src/KinectTouch.cpp:148: error: invalid types ‘int[unsigned int]’ for array subscript
../src/KinectTouch.cpp:150: error: ‘background’ was not declared in this scope
../src/KinectTouch.cpp:157: error: ‘depth’ was not declared in this scope
../src/KinectTouch.cpp:167: error: ‘foreground’ was not declared in this scope
../src/KinectTouch.cpp:170: error: ‘touch’ was not declared in this scope
../src/KinectTouch.cpp:211: error: ‘depth8’ was not declared in this scope
../src/KinectTouch.cpp:212: error: ‘debug’ was not declared in this scope
I've googled it and it seems to have something with including OpenCV libs (or something). I've tried to uninstall and install newest OpenCV, but I'm getting the same error.
Any ideas? Thanks.
i builded it according to the readme say, but when i run it i get an error message
"InitFromXmlFile failed: Can't create any node of the requested type!
Segmentation fault (core dumped)"
Hi ,
Whenever i try to run this through Command line it throws me this error .
Building file: ../src/oscpack/osc/OscOutboundPacketStream.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/ni -I"/home/robbe/workspace/KinectTouch/src/oscpack" -I"/home/robbe/workspace/KinectTouch/src/TUIO" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/oscpack/osc/OscOutboundPacketStream.d" -MT"src/oscpack/osc/OscOutboundPacketStream.d" -o"src/oscpack/osc/OscOutboundPacketStream.o" "../src/oscpack/osc/OscOutboundPacketStream.cpp"
Finished building: ../src/oscpack/osc/OscOutboundPacketStream.cpp
Building file: ../src/oscpack/osc/OscPrintReceivedElements.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/ni -I"/home/robbe/workspace/KinectTouch/src/oscpack" -I"/home/robbe/workspace/KinectTouch/src/TUIO" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/oscpack/osc/OscPrintReceivedElements.d" -MT"src/oscpack/osc/OscPrintReceivedElements.d" -o"src/oscpack/osc/OscPrintReceivedElements.o" "../src/oscpack/osc/OscPrintReceivedElements.cpp"
Finished building: ../src/oscpack/osc/OscPrintReceivedElements.cpp
Building file: ../src/oscpack/osc/OscReceivedElements.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/ni -I"/home/robbe/workspace/KinectTouch/src/oscpack" -I"/home/robbe/workspace/KinectTouch/src/TUIO" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/oscpack/osc/OscReceivedElements.d" -MT"src/oscpack/osc/OscReceivedElements.d" -o"src/oscpack/osc/OscReceivedElements.o" "../src/oscpack/osc/OscReceivedElements.cpp"
Finished building: ../src/oscpack/osc/OscReceivedElements.cpp
Building file: ../src/oscpack/osc/OscTypes.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/ni -I"/home/robbe/workspace/KinectTouch/src/oscpack" -I"/home/robbe/workspace/KinectTouch/src/TUIO" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/oscpack/osc/OscTypes.d" -MT"src/oscpack/osc/OscTypes.d" -o"src/oscpack/osc/OscTypes.o" "../src/oscpack/osc/OscTypes.cpp"
Finished building: ../src/oscpack/osc/OscTypes.cpp
Building file: ../src/oscpack/ip/posix/NetworkingUtils.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/ni -I"/home/robbe/workspace/KinectTouch/src/oscpack" -I"/home/robbe/workspace/KinectTouch/src/TUIO" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/oscpack/ip/posix/NetworkingUtils.d" -MT"src/oscpack/ip/posix/NetworkingUtils.d" -o"src/oscpack/ip/posix/NetworkingUtils.o" "../src/oscpack/ip/posix/NetworkingUtils.cpp"
../src/oscpack/ip/posix/NetworkingUtils.cpp:30:32: error: ip/NetworkingUtils.h: No such file or directory
../src/oscpack/ip/posix/NetworkingUtils.cpp:40: error: ‘NetworkInitializer’ has not been declared
../src/oscpack/ip/posix/NetworkingUtils.cpp:40: error: ISO C++ forbids declaration of ‘NetworkInitializer’ with no type
../src/oscpack/ip/posix/NetworkingUtils.cpp: In function ‘int NetworkInitializer()’:
../src/oscpack/ip/posix/NetworkingUtils.cpp:40: warning: no return statement in function returning non-void
../src/oscpack/ip/posix/NetworkingUtils.cpp: At global scope:
../src/oscpack/ip/posix/NetworkingUtils.cpp:42: error: expected constructor, destructor, or type conversion before ‘::’ token
make: *** [src/oscpack/ip/posix/NetworkingUtils.o] Error 1
While trying to build the following errors appears:
/home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:143:24: error: 'namedWindow' was not declared in this scope namedWindow(windowName); ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:144:47: error: 'createTrackbar' was not declared in this scope createTrackbar("xMin", windowName, &xMin, 640); ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:157:26: error: 'waitKey' was not declared in this scope while ( (char) waitKey(1) != (char) 27 ) { ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:184:93: error: 'findContours' was not declared in this scope findContours(touchRoi, contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE, Point2i(xMin, yMin)); ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:188:31: error: 'contourArea' was not declared in this scope if ( contourArea(contourMat) > touchMinArea ) { ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:219:38: error: 'cvtColor' was not declared in this scope cvtColor(depth8, debug, CV_GRAY2BGR); ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:221:39: error: 'rectangle' was not declared in this scope rectangle(debug, roi, debugColor1, 2); // surface boundaries ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:223:59: error: 'circle' was not declared in this scope circle(debug, touchPoints[i], 5, debugColor2, CV_FILLED); ^ /home/d4nd/Dev/KinectTouch/src/KinectTouch.cpp:227:27: error: 'imshow' was not declared in this scope imshow(windowName, debug); ^ make[2]: *** [CMakeFiles/KinectTouch.dir/build.make:63: CMakeFiles/KinectTouch.dir/src/KinectTouch.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/KinectTouch.dir/all] Error 2 make: *** [Makefile:84: all] Error 2
uname -a
Linux b14ck_arch 4.9.11-1-ARCH #1 SMP PREEMPT Sun Feb 19 13:45:52 UTC 2017 x86_64 GNU/Linux
I am very much interested in using this program, but I do not know how to compile it. I followed the readme instructions to the best of my knowledge but "make" is not a valid command. What do you need to do to make this work?
Hi Rob,
I am trying to compile and run your code in Visual Studio 2008. I downloaded OpenCV 2.1 and TUIO C++ api. I have setup OpenCV and TUIO properly and the code builds successfully. But when I run the app (win32 console app), it halts at FindContours(touchRoi, contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE, Point2i(xMin, yMin));
I can't tell why is this crashing. Could you tell me if I am doing anything wrong. I have primesense and openni 1.5 . I am pointing the primesense to a wall and its stable.
Would really like to try this out...
../src/oscpack/ip/posix/NetworkingUtils.cpp:30:32: error: ip/NetworkingUtils.h: No such file or directory
../src/oscpack/ip/posix/NetworkingUtils.cpp:40: error: ‘NetworkInitializer’ has not been declared
../src/oscpack/ip/posix/NetworkingUtils.cpp:40: error: ISO C++ forbids declaration of ‘NetworkInitializer’ with no type
../src/oscpack/ip/posix/NetworkingUtils.cpp: In function ‘int NetworkInitializer()’:
../src/oscpack/ip/posix/NetworkingUtils.cpp:40: warning: no return statement in function returning non-void
../src/oscpack/ip/posix/NetworkingUtils.cpp: At global scope:
../src/oscpack/ip/posix/NetworkingUtils.cpp:42: error: expected constructor, destructor, or type conversion before ‘::’ token
make: *** [src/oscpack/ip/posix/NetworkingUtils.o] Error 1
I am really interested, I want to run it in VS in win10, how can I achieve that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.