simonhr/ofxMSKinect

cvImage memcpy problem

Closed this issue · 2 comments

hi there!
thank you for sharing the wrapper first of all!
i try to save depth image to cvImage by setfrompixels (openCV) but keep getting access violation.

but i think
firstDevice->GetDepthPixels()

this will return bad ptr

and this is why it prevents memcpy.

looks like the thread is running to update depth pixel data but i still can't find why.

is this function working?

thank you!

solution: functions like IsDepthFrameNew() needs to be implemented in order not to return bad pointer by calling GetDepthPixels().

To do this,
bool m_DepthRefresh; // in MS_NUI_Kinect_Interface.h

needs to be accessed from testApp

Not a good programmer myself, but fun to learn while discovering.

i found IsDepthFrameNew() function.
but the functions is not working.
it keeps toggling m_DepthRefresh flag with deptheventthread.

So i just declare 8bit image a member variable in kinect class to get the 8bit depth pixels.