@ggachilove wrote:
Hello dude. I have a quick question about kinect addon's function which is getWorldCoordiateAt().
I already knew this function returns ofVec3f value but when I tried to get those return values in loop, there was nothing coming in. It was just 0, 0, 0.
However if I add some function in that which is getdistanceat() in if statement. like if(kinect.getDistanceAt( )>0) then I could got proper values. Do you guys know how this is working? why I need getdistanceat( )> 0 ?
The funtion getdistanceat( ) returns ofshortpixels.My code is:
void ofApp::draw(){
int w = 640; int h = 480; int step = 2; for(int y = 0; y < h; y += step) { for(int x = 0; x < w; x += step) { if(kinect.getDistanceAt(x, y) > 0) { cout<<kinect.getWorldCoordinateAt(x, y)<<endl; } } }
Posts: 1
Participants: 1