Color camera does not work
Posted: 05 July 2011 01:57 AM   [ Ignore ]
New Member
Rank
Total Posts:  2
Joined  2011-07-05

Hi,

My name is Alex and I just started using the CL NUI library. I’m using the kinect to track hand pose and determining the locations of the finger joints of the hand. My work enviroment is Visual Studio 2010, C++ only, and my system is Win 7 64bit.

I can get the depth data no problem using the GetNUICameraDepthFrameRAW, however, the function GetNUICameraColorFrameRAW or RGB24 or even RGB 32 do not write ANYTHING on my pre-allocated memory space. I’m not new to C++ and I know how to handle pointers and memory allocation, but it just seems that that function for the color camera does not work regardless of what I do. It returns a true value when called but doesn’t write anything in the memory. This is a sample code I used to get RGB camera picture:

      CLNUICamera cam = CreateNUICamera(GetNUIDeviceSerial(0));
  PDWORD rgb32_data = (PDWORD) malloc(640*480*4);
  StartNUICamera(cam);
  GetNUICameraColorFrameRGB32(cam, rgb32_data);

This is the simplest code I could find to test the camera and still nothing, it doesn’t write anything in “rgb32_data”. Yes the camera is connected, it is on, I checked the camera pointer and it has been initialized and the “rgp32_data” has been allocated.

My project is a masters project and I’m running out of time. If someone can please tell me what I’m missing or what I’m doing wrong I would be eternally grateful.

Many thanks,

Alex

Profile
 
 
 
 


RSS 2.0     Atom Feed