Category Archives: openframeworks

Erica

30 Jan 2013

self-organizing-map

Self Organizing Map

optical-flow

Optical Flow

I chose to try to include optical flow and a self-organizing map in the same of application. I picked these two in particular because I thought it could be really engaging to interact with such a map using the optical flow grid implemented by Denis Perevalov that I posted about here. This would allow the user to highlight different aspects of the map to get a better idea of how the values are interacting and influencing each other. I think that combining these two addons in this way could be an interesting approach for our data visualization project, but for the purposes of the Upkit Intensive I only got as far as compiling the two addons in the same project. I did test out each of the addons’ examples and will post videos of both below for anyone who is interested in a visual explanation of what each one does. Although it is unnecessary for me to post the example code as it is already on github for both addons, I have posted the code for self-organizing map here and for optical flow here.

Self Organizing Map from Erica Lazrus on Vimeo.

Optical Flow from Erica Lazrus on Vimeo.

Caroline

29 Jan 2013

 

Library Combo

Open framework add ons are written by generous people, who are helping make open framework a better place. However, no one is payed to write these addons and they can be in any state of development. The prompt for this assignment was to get two different libraries compiling in the same of sketch. After a long process of trial and error I ended up combining ofxOpticalFlowFarmback with ofxpostprocessing. Optical flow analyses movement based on direction and post processing turns whatever is being rendered into a gl mesh and applies filters to them. I selected these two libraries because I am interested in using camera vision to analyse motion and create interaction through that motion and because I am interested in learning more about how to use open gl to create fast custom filters.

Link to code on git: https://github.com/crecord/OfxAddonCombo

ofxAddons from Caroline Record on Vimeo.

Alan

28 Jan 2013

 

The Github Repo: https://github.com/chinesecold/FaceOSCTwitter

The original idea of this project is using FaceOSC to capture emotions to control your web experience. It combines ofxOSC and ofxJSON addons together to change the way how you tweet.

In the video, if you keep your mouth open enough, you will see the current top 10 trend from Twitter.
Tweet met some problems right now with OAuth. I am working on this.

Screen Shot 2013-01-28 at 9.19.56 AM

Bueno

28 Jan 2013

Screen Recording 3 from Andrew Bueno on Vimeo.

I happen to take my webcam wiggling very seriously, thank you very much. I managed to get a pretty decent psychedelic effect with extremely minimal effort – basically I took the ofxOpticalFlowFarneback example and mixed it with the example for ofxBlur. The result is cool, though I wish the blur wouldn’t gray out as much as it seems to. My original plan was to utilize ofxAsciiArt as a filter for the colorful effects of ofxOpticalFlowFarneback, but the creator of it had a rather strange set of dependencies going on.

https://github.com/buenoIsHere/ofxAddonsExample

 
#include "testApp.h"

//--------------------------------------------------------------
void testApp::setup(){

    vidGrabber.initGrabber(640, 480);
    flowSolver.setup(vidGrabber.getWidth()/2, vidGrabber.getHeight()/2, 0.5, 3, 10, 1, 7, 1.5, false, false);
    ofEnableAlphaBlending();
    blur.setup(vidGrabber.getWidth(), vidGrabber.getHeight(), 4, .2, 4);
}

//--------------------------------------------------------------
void testApp::update(){
    vidGrabber.update();
    if(vidGrabber.isFrameNew()){
        flowSolver.update(vidGrabber);
    }

    blur.setScale(ofMap(mouseX, 0, ofGetWidth(), 1, 10));
	blur.setRotation(ofMap(mouseY, 0, ofGetHeight(), -PI, PI));
}

//--------------------------------------------------------------
void testApp::draw(){

    ofSetColor(255, 255, 255);

    blur.begin();
    vidGrabber.draw(0, 0);
    flowSolver.drawColored(vidGrabber.getWidth(), vidGrabber.getHeight(), 10, 3);
    ofSetCircleResolution(64);
	ofCircle(mouseX, mouseY, 32);
	blur.end();

    blur.draw();

}

//--------------------------------------------------------------
void testApp::keyPressed(int key){
    if(key == 'p') { flowSolver.setPyramidScale(ofClamp(flowSolver.getPyramidScale() - 0.01,0.0,1.0)); }
    else if(key == 'P') { flowSolver.setPyramidScale(ofClamp(flowSolver.getPyramidScale() + 0.01,0.0,1.0)); }
    else if(key == 'l') { flowSolver.setPyramidLevels(MAX(flowSolver.getPyramidLevels() - 1,1)); }
    else if(key == 'L') { flowSolver.setPyramidLevels(flowSolver.getPyramidLevels() + 1); }
    else if(key == 'w') { flowSolver.setWindowSize(MAX(flowSolver.getWindowSize() - 1,1)); }
    else if(key == 'W') { flowSolver.setWindowSize(flowSolver.getWindowSize() + 1); }
    else if(key == 'i') { flowSolver.setIterationsPerLevel(MAX(flowSolver.getIterationsPerLevel() - 1,1)); }
    else if(key == 'I') { flowSolver.setIterationsPerLevel(flowSolver.getIterationsPerLevel() + 1); }
    else if(key == 'a') { flowSolver.setExpansionArea(MAX(flowSolver.getExpansionArea() - 2,1)); }
    else if(key == 'A') { flowSolver.setExpansionArea(flowSolver.getExpansionArea() + 2); }
    else if(key == 's') { flowSolver.setExpansionSigma(ofClamp(flowSolver.getExpansionSigma() - 0.01,0.0,10.0)); }
    else if(key == 'S') { flowSolver.setExpansionSigma(ofClamp(flowSolver.getExpansionSigma() + 0.01,0.0,10.0)); }
    else if(key == 'f') { flowSolver.setFlowFeedback(false); }
    else if(key == 'F') { flowSolver.setFlowFeedback(true); }
    else if(key == 'g') { flowSolver.setGaussianFiltering(false); }
    else if(key == 'G') { flowSolver.setGaussianFiltering(true); }
}

//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){ 

}

Andy

28 Jan 2013

Github: https://github.com/andybiar/WhoLetTheDogsOut

With Dan’s permission, I am going to delay shooting a video until a later time. The entire whimsy of Who Let the Dogs Out is watching the dogs run around, but they won’t be awake until maybe noon Eastern time.

Who Let the Dogs Out is perhaps the cutest and most whimsical of my projects. I use the IpVideoGrabber addon with XMLSettings and OpenCV and SoundPlayer to stream video footage from the webcams at the Sniff Dog Hotel in Portland, Oregon, and whenever the user presses a key they can start or stop the classic song “Who Let the Dogs Out” by the Baja Men. I wanted to more with this originally, but the ofMotiontracker addon was very naughty and substantially vexed me to discontinue its use. Further pursuits may include stripping the background subtraction algorithm from the OpenCVExample and then using the blob detection in a generative work.

dogs

Meng

28 Jan 2013

Dues make my nose blooding !!!!!!!!
Bloodnose actually with ofxosc + OfxBox2d.
This is a simply sketch with ofxosc+ofBox2d.
I trying to use other addones such as a combination of ofxCV ofxVector, but can not successfully build. So I decided to do it in a easy way with this two addones.These two addons are popular and with very good documentation. This may let a coding newbie do things less frustrated. With this experience I learn that the importance of good documentation such as coding comment and read me files.

The current technical problem is that I cannot update the circles behind the dude’s face…

PO4 - meng

code is here: https://github.com/mengs/ofxoscOfxBox2d

Elwin

28 Jan 2013

p1_ofx
I think this was the most difficult/annoying part of all the assignments. It was my first time using openFrameworks and I don’t really have experience with C++. I tried more than a dozen addons and most of them didn’t work. Lots of errors, missing links and empty projects. The ones that did work were relatively the same… I tried connecting several addons together but with no success. Finally, I just went for ofxMSAPhysics together with ofxMSACore & ofxMSAObjCPointer.

Patt

28 Jan 2013

ofxAddons_cs

I combined ofxImageExportQueue and ofxWorkQueues. They go together, as in ofxImageExportQueue needs ofxWorksQueues in order to function. I adapted imageSequenceExample to get the .gif file working and the videoGrabberExample to set up the webcam. What the addons do is that it takes a series of screenshots when the key ‘t’ is pressed. The photo files are then sent to the data folder inside the bin folder of this specific app. The concept to this openFrameworks project is that the webcam will take screenshots of a person’s reaction when watching the mindblown.gif. I thought it would be funny to see different reactions, and to keep the files in the photo format rather than a video.

Here’s the code: https://github.com/pattvira/ofxAddons_UpkitIntensive

~Taeyoon

28 Jan 2013

 

I am honestly ashamed to post this homework, but I respect deadline, so here it goes. I tried working with many addons, including fancy deluxe package such as ofxTimeline and etc. Somehow, I wasn’t compiling them right. And every when they compile, they wouldn’t speak to one another. This example is a super early work in progress. I’d like to draw a shape, triangulate it, and animate the mesh via ofxAnimate. So far, I’ve only got to draw, animate the outline and have two rectangles come back to the mouse (and even that’s an accidental hack). The app crashes where the drawings are clustered. https://github.com/tchoi8/IACD/tree/master/Animatable_Triangle_2

Another app that I was working on was using opencvHaarFinder to detect face and make a playing card via exporting to pdf. I got only as far as finding faces and laying them out on the side. Will work on this, and also test with ofFaceOSC and ofTLDdetector as they might be better algorithm.  https://github.com/tchoi8/IACD/tree/master/opencvHaarFinderExample223d2f874680511e281d822000a1f9682_7

John

28 Jan 2013

Screen Shot 2013-01-28 at 3.31.12 AMI’m still finding my way around OpenFrameworks and also XCode which feels clunky and extremely demanding (why does it keep chaning my directory view when I compile?) At the same time the benefits of OF over Processing wrt computational capability are pretty obvious even now.

My demo is a combination of the openCV addon which comes included and the ofDrawnetic addon. The two don’t interrelate at all, they simply share the screen. Just for the record, ofDrawnetic has some really top notch examples.

Here’s the repo: https://github.com/johngruen/camera_draw

ofxaddons from john gruen on Vimeo.