Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example-bodies/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ void ofApp::draw()

// Spine.
vertices[vdx++] = toGlm(skeleton.joints[K4ABT_JOINT_PELVIS].position);
vertices[vdx++] = toGlm(skeleton.joints[K4ABT_JOINT_SPINE_NAVAL].position);
vertices[vdx++] = toGlm(skeleton.joints[K4ABT_JOINT_SPINE_NAVEL].position);

vertices[vdx++] = toGlm(skeleton.joints[K4ABT_JOINT_SPINE_NAVAL].position);
vertices[vdx++] = toGlm(skeleton.joints[K4ABT_JOINT_SPINE_NAVEL].position);
vertices[vdx++] = toGlm(skeleton.joints[K4ABT_JOINT_SPINE_CHEST].position);

vertices[vdx++] = toGlm(skeleton.joints[K4ABT_JOINT_SPINE_CHEST].position);
Expand Down
8 changes: 6 additions & 2 deletions example-pointcloud/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ void ofApp::setup()
{
this->kinectDevice.startCameras();
}
glPointSize(2);
cam.rotateDeg(160, glm::vec3(0, 1, 0));
cam.rotateDeg(180, glm::vec3(0, 0, 1));

}

//--------------------------------------------------------------
Expand All @@ -34,7 +38,7 @@ void ofApp::update()
void ofApp::draw()
{
ofBackground(128);

ofEnableDepthTest();
if (this->kinectDevice.isStreaming())
{
this->cam.begin();
Expand All @@ -55,7 +59,7 @@ void ofApp::draw()
}
this->cam.end();
}

ofDisableDepthTest();
ofDrawBitmapString(ofToString(ofGetFrameRate(), 2) + " FPS", 10, 20);
}

Expand Down
6 changes: 3 additions & 3 deletions src/ofxAzureKinect/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ namespace ofxAzureKinect
{
if (this->bUpdateColor)
{
this->updateWorldVbo(colorImg, this->colorToWorldImg);
this->updateWorldVbo(depthImg, this->colorToWorldImg);
}
else
{
Expand Down Expand Up @@ -427,7 +427,7 @@ namespace ofxAzureKinect

bool Device::setupColorToWorldTable()
{
if (this->setupImageToWorldTable(K4A_CALIBRATION_TYPE_COLOR, this->colorToWorldImg))
if (this->setupImageToWorldTable(K4A_CALIBRATION_TYPE_DEPTH, this->colorToWorldImg))
{
const int width = this->colorToWorldImg.get_width_pixels();
const int height = this->colorToWorldImg.get_height_pixels();
Expand Down Expand Up @@ -528,7 +528,7 @@ namespace ofxAzureKinect
if (frameData[idx] != 0 &&
tableData[idx].xy.x != 0 && tableData[idx].xy.y != 0)
{
float depthVal = static_cast<float>(frameData[idx]);
uint16_t depthVal = (frameData[idx]);
this->positionCache[numPoints] = glm::vec3(
tableData[idx].xy.x * depthVal,
tableData[idx].xy.y * depthVal,
Expand Down