Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated for ofxKinect and ofxCv

  • Loading branch information...
commit 17fd5dd348c81b8cb69f2ffe726167a9d2d533c9 1 parent 6469427
@kylemcdonald kylemcdonald authored
View
2  ShadowCast/Project.xcconfig
@@ -6,4 +6,4 @@ OF_PATH = ../../..
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
OTHER_LDFLAGS = $(OF_CORE_LIBS)
-HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) "../../../addons/ofxKinect/libs/libusb/osx/include/" "../../../addons/ofxOpenCv/libs/opencv/include/"
+HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) "../../../addons/ofxKinect/libs/libusb/osx/include/" "../../../addons/ofxCv/libs/ofxCv/include/" "../../../addons/ofxCv/libs/opencv/include/"
View
1,701 ShadowCast/ShadowCast.xcodeproj/project.pbxproj
567 additions, 1,134 deletions not shown
View
61 ShadowCast/src/Blur.h
@@ -1,61 +0,0 @@
-#pragma once
-
-#include "ofMain.h"
-
-class Blur {
-private:
- ofFbo ping, pong;
- ofShader horizontalBlur, verticalBlur;
- int passes;
- float radius;
-
-public:
- void setup(int width, int height) {
- ping.allocate(width, height);
- pong.allocate(width, height);
- ping.begin(); ofClear(0); ping.end();
- pong.begin(); ofClear(0); pong.end();
- horizontalBlur.load("", "shaders/horizontalBlur.frag");
- verticalBlur.load("", "shaders/verticalBlur.frag");
- }
- void setPasses(int passes) {
- this->passes = passes;
- }
- void setRadius(float radius) {
- this->radius = radius;
- }
- void begin() {
- ofPushStyle();
- ofPushMatrix();
- pong.begin();
- }
- void end(bool draw = true) {
- pong.end();
-
- glColor4f(1, 1, 1, 1);
- for(int i = 0; i < passes; i++) {
- ping.begin();
- horizontalBlur.begin();
- horizontalBlur.setUniform1f("radius", radius);
- pong.draw(0, 0);
- horizontalBlur.end();
- ping.end();
-
- pong.begin();
- verticalBlur.begin();
- verticalBlur.setUniform1f("radius", radius);
- ping.draw(0, 0);
- verticalBlur.end();
- pong.end();
- }
-
- if(draw) {
- pong.draw(0, 0);
- }
- ofPopStyle();
- ofPopMatrix();
- }
- ofTexture& getTextureReference() {
- return pong.getTextureReference();
- }
-};
View
5 ShadowCast/src/testApp.cpp
@@ -13,6 +13,9 @@ ofVec3f ConvertProjectiveToRealWorld(ofVec3f projective) {
projective.z);
}
+using namespace ofxCv;
+using namespace cv;
+
void testApp::setup(){
ofSetVerticalSync(true);
ofSetBackgroundAuto(false);
@@ -77,7 +80,7 @@ void testApp::setup(){
}
curScene = 0;
- ofxKinectCalibration::setClippingInCentimeters(100, 500);
+ kinect.setDepthClipping(1000, 5000);
kinect.init(false, false);
kinect.open();
View
4 ShadowCast/src/testApp.h
@@ -57,8 +57,8 @@ class testApp : public ofBaseApp{
int curScene;
ofxKinect kinect;
- Mat kinectAccumulator, kinectAccumulator8u;
- ContourFinder contourFinder;
+ cv::Mat kinectAccumulator, kinectAccumulator8u;
+ ofxCv::ContourFinder contourFinder;
ofImage filled;
vector<ofVec3f> users;
vector<unsigned int> userLabels;
Please sign in to comment.
Something went wrong with that request. Please try again.