I am testing with the OpenCV 2.3.1 in OSX. The
Homebrew and MacPorts versions do not build with the OpenNI option. To build it myself with CMake and XCode, I came into compilation error with the flann include files: any.h and lsh_index.h. After searching for a while, I found the solution as stated in Hiroaki Sawano’s website and patched the two files.
kinect_maps sample run
There are a number of requests of the code I adopt the OpenCV people detection sample. Here it is.
using namespace cv ;
int main ( int argc, const char * argv [ ] )
VideoCapture cap ( 0 ) ;
cap. set (CV_CAP_PROP_FRAME_WIDTH, 320 ) ;
cap. set (CV_CAP_PROP_FRAME_HEIGHT, 240 ) ;
if ( !cap. isOpened ( ) )
return - 1 ;
Mat img ;
namedWindow ( "opencv", CV_WINDOW_AUTOSIZE ) ;
HOGDescriptor hog ;
hog. setSVMDetector (HOGDescriptor :: getDefaultPeopleDetector ( ) ) ;
while ( true )
cap >> img ;
if (img. empty ( ) )
vector <Rect > found, found_filtered ;
hog. detectMultiScale (img, found, 0, Size ( 8, 8 ), Size ( 32, 32 ), 1.05, 2 ) ;
size_t i, j ;
for (i = 0 ; i <found. size ( ) ; i ++ )
Rect r = found [i ] ;
for (j = 0 ; j <found. size ( ) ; j ++ )
if (j ! =i && (r & found [j ] ) == r )
if (j == found. size ( ) )
found_filtered. push_back (r ) ;
for (i = 0 ; i <found_filtered. size ( ) ; i ++ )
Rect r = found_filtered [i ] ;
r. x + = cvRound (r. width * 0.1 ) ;
r. width = cvRound (r. width * 0.8 ) ;
r. y + = cvRound (r. height * 0.07 ) ;
r. height = cvRound (r. height * 0.8 ) ;
rectangle (img, r. tl ( ), r. br ( ), Scalar ( 0, 255, 0 ), 3 ) ;
imshow ( "opencv", img ) ;
if (waitKey ( 10 ) >= 0 )
return 0 ;
Here is the second particles system exercise in TouchDesigner. In this version, the particles are 3D SOP boxes.
It is a more simple demonstration of using the Feedback texture operator (TOP) in TouchDesigner. Again, it has only visual at the moment.
This is an introductory tutorial for creating particles system in
TouchDesigner. At the moment, it only has visual imagery. I’ll try to add audio for the explanation later.
After a lot of searching and trials, I finally compile the
PTAM and PTAMM in OSX Lion. Have a look of the PTAM trial run.
This video is the test run of the Face Tracker code by
Jason Saragih. I compile and run it in OSX 10.7 with OpenCV 2.3.
Since Xcode will build the product into the user’s Library folder, I have to put the face model information in the product folder. In OSX 10.7, the Library folder in hidden. I have to unhide it by
chflags nohidden ~/Library/
I just found this very useful
Processing wrapper for OpenNI. It included a number of useful functionalities in OpenNI.