Giter VIP home page Giter VIP logo

emerge2016's Introduction

Depth Portraits

Interactive portrait installation that transforms a person's likeness into a real-time digitally processed 3D portrait and archives it on the internet to be viewed in the browser. See http://emerge.brangerbriz.com.

Project Overview

For instructions on setting up an archive of the project website, see the Docker Archive section. This project contains two primary components, installation/ and microsite/.

  • installation/ contains the code needed to run the portrait capturing installation on a linux (tested with Ubuntu 14.04) machine at the venue. This machine should have a Kinect v1 connected. The application is built with NW.js v0.12.3 and uses this node-kinect submodule to pipe raw 11-bit depth-images via websockets from a node v0.10.25 instance to the NW.js application. The installation is setup to automatically detect (using motion values produced from a frame-differencing algorithm) a user's presence in front of the kinect and begin recording a portrait and saving it to the database. If the microsite/ has been deployed (and the installation was launched with bin/start_installations.sh) a reverse-ssh tunnel should have also been created to the cloud server running the microsite/ and a master-slave replication model should be setup to keep the online database in sync with the database running on the installation/ machine. All default behaviors can be tweaked by visiting the control panel at http://localhost:8003/ on the installation/ machine. If printing is enabled via that panel (and the correct printer-related steps in this [bin/README.md](bin/README.md) have been followed) then each portrait sessions should trigger a portrait printout with custom URL via a Polaroid POGO bluetooth printer so that users can find their 3D portrait on the web.

  • microsite/ contains the code needed to run the archive website where users can view and share the portraits they created with installation/. It should be run from a cloud linux server with bin/start_microsite.sh assuming MongoDB and Node.js are installed (and everything has been installed w/ npm install in microsite/). See http://emerge.brangerbriz.com for an example of a live version of microsite/.

Branches

Each time the project is deployed at a new event or location we create a new branch for it:

Dependencies

This project is fairly involved and may be difficult to setup on a machine if you are unfamiliar with many of the tools involved. If you intend to only install an archive of this project, instead of a new functioning version, see the Docker Archive section.

Running the Installation

With everything properly installed:

cd installations
npm install
../bin/start_installation.sh
# to stop the processes launched by running the installation
../bin/stop_installation.sh

Running the Microsite

On your cloud server run:

cd microsite
npm install
../bin/start_microsite.sh

For a full list of all automation scripts see this README.

Repurposing the Project for a New Event

Below is a checklist of things to edit in order to reskin the project for a new event or venue. The result will be an installation that uploads portraits to a new microsite.

Clone the repo to a new folder (even if you already have a clone of the project). Change NEW_NAME to fit your new event/project name.

git clone https://github.com/brangerbriz/emerge2016.git # clone the repo
mv emerge2016 NEW_EVENT # rename the repo
git checkout -b NEW_EVENT # create and checkout a new branch

The following edits are now required (Replace NEW_* with custom values):

  • bin/env.sh Here many variables can be changed depending on your setup, most notably:

      - `MONGOD_PORT`: The port to run `mongod` on
      - `REMOTE_SERVER_HOST`: Host used to create a reverse-ssh tunnel allowing the microsite `mongod` instance to be the slave of a master `mongod` instance running on the installation machine behind a firewall.
      - `SSH_TUNNEL_REMOTE_USER`: The user on `REMOTE_SERVER_HOST`.
      - `SSH_TUNNEL_REMOTE_PORT`: The port to open on `REMOTE_SERVER_HOST` that will be forwarded to the installation machine's `MONGOD_PORT`.
    
  • installation/app.js

    • mongoose.connect('mongodb://localhost:4003/emerge'); to mongoose.connect('mongodb://localhost:NEW_MONGOD_PORT/NEW_DATABASE');
    • var url = PARAM.saveData ? "emerge.brangerbriz.com/" + id : "emerge.brangerbriz.com"; to var url = PARAM.saveData ? "NEW_NAME.brangerbriz.com/" + id : "NEW_NAME.brangerbriz.com";
    • Remove both this.context.drawImage(...) calls inside CardPriner.renderImage(...) or replace with your own logos.
  • microsite/server.js

    • mongoose.connect('mongodb://localhost:4004/byob'); to mongoose.connect('mongodb://localhost:NEW_MONGOD_PORT/NEW_DATABASE');
    • Change port that server is listening on (3003 by default).
    • title value in all instances of res.render(...)
  • microsite/views/*

    • All meta tags that feature a description or twitter/open graph cards
    • Update google analytics link
    • microsite/views/index.html: Description in p.desktop-only and p.mobile-only.
    • microsite/views/portrait.html: Share links in div.shareButtons a and all instances of eMergePortrait or eMerge Portrait. Also remove all instances of EA16 hashtag in share content.
  • share/flaggedList.js: Empty or update. Also remove microsite/public/flaggedList.js if it exists because that file will incorrectly be used instead if it is present.

Docker Archive

A special branch emerge-docker branch exists for the purpose of creating an archive of the emerge website. Unlike the project, this archive is read-only, meaning it hasn't been configured to receive live uploads or Kinect data like the description above^. It is, however, useful as an archival version of the project. Installing and running this archive is trivial. You must have docker and docker-compose installed before proceeding.

# clone the repo and checkout the emerge-docker branch
git clone https://github.com/brangerbriz/emerge2016
cd emerge2016
git checkout emerge-docker

# download and extract the mongodb database backup (exported with mongodump)
cd data
wget -O emerge-mongodump.tar.gz https://github.com/brangerbriz/emerge2016/releases/download/v1.0/emerge-mongodump.tar.gz
tar xzf emerge-mongodump.tar.gz
rm emerge-mongodump.tar.gz
cd ..

# build and launch the containers
docker-compose up -d

# import the mongodb archive from emerge. This only needs to be done once!
docker-compose exec mongo mongorestore --port 4003 /emerge-mongodump

emerge2016's People

Contributors

brannondorsey avatar nbriz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emerge2016's Issues

Investigate kinect-daemon crash

listening on http://localhost:8008
[Stream 70] Negotiated packet size 1920
write_register: 0x0105 <= 0x00
write_register: 0x0006 <= 0x00
write_register: 0x0012 <= 0x03
write_register: 0x0013 <= 0x01
write_register: 0x0014 <= 0x1e
write_register: 0x0006 <= 0x02
write_register: 0x0017 <= 0x00
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Context.EventEmitter.addListener (events.js:160:15)
    at Namespace.<anonymous> (/home/brannondorsey/Documents/work/Branger_Briz/emerge2016/installation/kinect-daemon/server.js:20:9)
    at Namespace.EventEmitter.emit (events.js:95:17)
    at Namespace.emit (/home/brannondorsey/Documents/work/Branger_Briz/emerge2016/installation/node_modules/socket.io/lib/namespace.js:206:10)
    at /home/brannondorsey/Documents/work/Branger_Briz/emerge2016/installation/node_modules/socket.io/lib/namespace.js:174:14
    at process._tickCallback (node.js:415:13)

limit number of keyframes per session

think all we should have to do is put .saveKeyFrame && .saveThumbnail inside a conditional

                        if( KeyFrame.thumbCount <= 4 ){

            KeyFrame.saveKeyFrame(
                new Buffer( depth.data ).toString('base64'),
                frameDiff.canvas.toDataURL(),
                Motion.gate
            );  

            KeyFrame.saveThumbnail();
                        }

screen shot freezing

maybe move the screenshot'n of the portrait page's share functionality into a worker to prevent the freezing up

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.