Technological parodies and parodies of technology.

Anywhere But Here

February 23rd, 2008

Anywhere But HERE! is a playful examination of the use of party photography as social currency. Participants use an assortment of props, costumes, and computer-aided special effects to fake being at an imaginary location.

For more pictures from the installation, check out the page on the Digital Situations site.


Here is a little taste of the openFrameworks application that we used to project the backgrounds. For the whole thing, head to the downloads page.

#ifndef _TEST_APP
#define _TEST_APP

#define OF_ADDON_USING_OFXMLSETTINGS

#include “ofMain.h”
#include “ofAddons.h”
#include “ofXmlSettings.h”
#include “ofCvMain.h”
#include “boxAlign.h”
#include “Scenario.h”
#include “Prop.h”

#define NUM_SCENARIOS 16
#define HANDLE_SIZE 6

#define MENUOPTION_NUDGEBLOB 0
#define MENUOPTION_BG 1
#define MENUOPTION_EYEDROPPER 2
#define MENUOPTION_CAMERASETTINGS 3
#define MENUOPTION_VISIONSETTINGS 4
#define MENUOPTION_ERODE 5
#define MENUOPTION_DILATE 6
#define MENUOPTION_THRESHOLD 7
#define MENUOPTION_BLUR 8
#define MENUOPTION_FULLSCREEN 9
#define NUM_MENU_OPTIONS 10

class testApp : public ofSimpleApp, public ofCvBlobListener {

public:

testApp();
void setup();
void update();
void draw();

void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased();
void joystick(unsigned int buttonMask, int x, int y, int z);

ofRectangle panelRect;

void blobOn( int x, int y, int id, int order );
void blobMoved( int x, int y, int id, int order );
void blobOff( int x, int y, int id, int order );

void drawSettingsPanel();
int getClickedBlob(int x, int y);
void drawThumbnails();

bool bFullscreen;
bool bLearnBakground;
bool bShowSettings;
bool bMouseDown;
bool bDoBlobTracking;
float scaleX, scaleY;

char menuStringArray[NUM_MENU_OPTIONS][256];
int threshold;
int blur;
int erode;
int dilate;
int currentScene;
int currentMenuOption;
int old_blob_x, old_blob_y; // Temp vars – hold the old position of a blob between the time the mouse is pressed and when it is released
int vision_x, vision_y, old_vision_x, old_vision_y;
int screenWidth, screenHeight;
int camWidth, camHeight;
int bgScale;
int mousePressX, mousePressY;
//int selectedBlobId;
int old_panel_x, old_panel_y;

Scenario scenarios[NUM_SCENARIOS];

ofImage eyedropper;
int eyedropper_r, eyedropper_g, eyedropper_b;

// The arrays used to hold the pixels that will form the mask
unsigned char * diffPixels;
unsigned char * maskPixels;

int cursorCounter;
ofVideoGrabber vidGrabber;

ofCvContourFinder contourFinder;
ofCvBlobTracker blobTracker;
//ofPoint blobOffset[1000];

ofCvColorImage colorImg; // The original image coming from the camera
ofCvGrayscaleImage grayImage; // The desaturated image coming from the camera
ofCvGrayscaleImage giWarped; // The warped versin of the grayImage, using CBoxAligner to warp
ofCvGrayscaleImage grayBg; // A snapshot of giWarped, used for background subtraction
ofCvGrayscaleImage grayDiff; // The difference between giWarped and grayBg
//ofCvGrayscaleImage scaledDiff; // grayDiff scaled up to 1026 x 768
//ofTexture scaledMask; // scaledDiff turned into an RGBA image with the black transparent
ofTexture diffMask;

ofXmlSettings XML;
ofPoint originalSize[4];

CBoxAligner m_box;

};

#endif



Related Stuff



No Comments

addLeave a comment