Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: mind_ on Nov 27th, 2012  |  syntax: C++  |  size: 0.54 KB  |  views: 55  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include "opencv2/imgproc/imgproc.hpp"
  2. #include "opencv2/highgui/highgui.hpp"
  3.  
  4. #include <iostream>
  5. #include <WinDef.h>
  6. #include <conio.h>
  7. #include "CLNUIDevice.h"
  8.  
  9. using namespace cv;
  10. using namespace std;
  11.  
  12. int main( int argc, const char** argv )
  13. {
  14.     PBYTE imageName = (PBYTE) malloc(640*480*3);
  15.     GetNUICameraColorFrameRAW(KinectCamera, imageName);
  16.  
  17.     kinectImage = cvCreateImageHeader(cvSize(640,480), IPL_DEPTH_8U, 3);
  18.     cvSetData(kinectImage,imageName,640*3);
  19.     cvShowImage( "Kinect", kinectImage ) ;
  20.  
  21.     return 0;
  22. }