summaryrefslogtreecommitdiff
path: root/offsetProject/src/ofApp.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2014-02-19 16:11:19 +0000
committerComment <tim@gray.(none)>2014-02-19 16:11:19 +0000
commit565fad9df0e5d509939f5c3d17d550a6f3e4b7b5 (patch)
treeea93369b19c9c26ea275c398798b6deae854c1fd /offsetProject/src/ofApp.cpp
parentd63937d54f41aa94236be6d7da3eede9b07196c7 (diff)
extend border correct
Diffstat (limited to 'offsetProject/src/ofApp.cpp')
-rw-r--r--offsetProject/src/ofApp.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/offsetProject/src/ofApp.cpp b/offsetProject/src/ofApp.cpp
index 3399aca..28b44e8 100644
--- a/offsetProject/src/ofApp.cpp
+++ b/offsetProject/src/ofApp.cpp
@@ -48,8 +48,8 @@ void ofApp::setup() {
//b extend captured frame to this ratio
//c mip map this down into prepared containers
- int tiles_w=ceil(kinect.width/(MAX_TILE_SIZE*2))*2;
- int tiles_h=ceil(kinect.height/(MAX_TILE_SIZE*2))*2;
+ int tiles_w=ceil((float)kinect.width/(MAX_TILE_SIZE*2))*2;
+ int tiles_h=ceil((float)kinect.height/(MAX_TILE_SIZE*2))*2;
extend_w=(tiles_w)*MAX_TILE_SIZE;
extend_h=(tiles_h)*MAX_TILE_SIZE;
@@ -65,7 +65,7 @@ void ofApp::setup() {
for (int i=MIN_TILE_SIZE,l=0;i<=MAX_TILE_SIZE;i*=2,l++) {
colourTiles[l].allocate(extend_w/i,extend_h/i);
depthTiles[l].allocate(extend_w/i,extend_h/i);
- cerr<<"level "<<levels<<" mipmap: "<<colourTiles[l].getWidth()<<"x"<<colourTiles[l].getHeight()<<endl;
+ cerr<<"level "<<l<<" mipmap: "<<colourTiles[l].getWidth()<<"x"<<colourTiles[l].getHeight()<<endl;
}
}
@@ -111,6 +111,19 @@ void ofApp::update() {
void ofApp::draw() {
ofSetColor(255, 255, 255);
+
+ depthImage.draw(10, 10, 640, 480);
+ colourImage.draw(10, 500, 640, 480);
+
+ int xoffs=660;
+ for (int i=0;i<depthTiles.size();i++){
+ depthTiles[i].draw(xoffs,10,depthTiles[i].getWidth(),depthTiles[i].getHeight());
+ colourTiles[i].draw(xoffs,500,colourTiles[i].getWidth(),colourTiles[i].getHeight());
+ xoffs+=(colourTiles[i].getWidth()+10);
+ }
+
+
+ /*
// draw from the live kinect
kinect.drawDepth(10, 10, 400, 300);
@@ -134,6 +147,8 @@ void ofApp::draw() {
}
ofDrawBitmapString(reportStream.str(), 20, 652);
+
+ */
}