Closed lucieb closed 11 years ago
The function getWorldCoordinateFor(...) located in ofxKinectNui.cpp is accessing the wrong depth pixel.
At the moment, the function is:
ofVec3f ofxKinectNui::getWorldCoordinateFor(int depthX, int depthY){ const double depthZ = distancePixels[depthWidth * depthX + depthY]/1000.0; return ofxBase3DVideo::getWorldCoordinateFor(depthX, depthY, depthZ); }
but it should be
ofVec3f ofxKinectNui::getWorldCoordinateFor(int depthX, int depthY){ const double depthZ = distancePixels[depthWidth * depthY + depthX]/1000.0; /// <----- Need to invert depthX and depthY return ofxBase3DVideo::getWorldCoordinateFor(depthX, depthY, depthZ); }
Thx, @lucieb It's a great help! : ) worldcoordinatefor is one of the issue that i have to complete. ; ) I will check it and implement asap!
@lucieb I have fixed. : ) Thanks for your advise.
The function getWorldCoordinateFor(...) located in ofxKinectNui.cpp is accessing the wrong depth pixel.
At the moment, the function is:
ofVec3f ofxKinectNui::getWorldCoordinateFor(int depthX, int depthY){ const double depthZ = distancePixels[depthWidth * depthX + depthY]/1000.0; return ofxBase3DVideo::getWorldCoordinateFor(depthX, depthY, depthZ); }
but it should be
ofVec3f ofxKinectNui::getWorldCoordinateFor(int depthX, int depthY){ const double depthZ = distancePixels[depthWidth * depthY + depthX]/1000.0; /// <----- Need to invert depthX and depthY return ofxBase3DVideo::getWorldCoordinateFor(depthX, depthY, depthZ); }