Skip to content

Instantly share code, notes, and snippets.

//make sure that OpenCV can find a face
if (finder.blobs.size() > 0) {
//then make a new image that is the width and height of the face bounding box
imageFace.allocate(finder.blobs[0].boundingRect.x, finder.blobs[0].boundingRect.y, OF_IMAGE_COLOR_ALPHA);
//unsigned char * origPixels = image.getPixels();
//make a new data type for the new image's pixels
unsigned char * copyPixels = imageFace.getPixels();
#include "testApp.h"
extern "C" {
#include "macGlutfix.h"
}
//--------------------------------------------------------------
void testApp::setup(){
//faceWidth = 200;
Switched to branch 'veev'
172-26-12-137:AppropriatingNewTechnologies genevieve$ git remote
origin
upstream
172-26-12-137:AppropriatingNewTechnologies genevieve$ git remote https://github.com/stpn/AppropriatingNewTechnologies.git
error: Unknown subcommand: https://github.com/stpn/AppropriatingNewTechnologies.git
usage: git remote [-v | --verbose]
or: git remote add [-t <branch>] [-m <master>] [-f] [--mirror=<fetch|push>] <name> <url>
or: git remote rename <old> <new>
or: git remote rm <name>
float[] volume;
float[] adjClose;
float closeY;
float time;
float index;
float volumeColor;
int width = 512;
int height = 512;
@veev
veev / testApp.cpp
Created January 28, 2013 04:22
Darkness Map histogram draw test. This shows how drawing to the texture is supposed to work with alpha transparency at first. This property is working on osx (as seen here) but not on iphone. why?
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
camWidth = 320;
camHeight = 240;
canvasWidth = 320;
canvasHeight = 50;
grabber.setVerbose(true);
@veev
veev / gist:6906394
Created October 9, 2013 19:02
MPE Ball Receiving Keypress
#include "testApp.h"
#define RECONNECT_TIME 400
//--------------------------------------------------------------
void testApp::setup(){
// initialize app
ofSetFrameRate(30);
ofEnableSmoothing();
ofEnableAlphaBlending();
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stats Test Open Spaces</title>
<script type="text/javascript" src="js/vendor/d3.v3.min.js"></script>
<script type="text/javascript" src="js/vendor/topojson.v1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" href="css/style.css" />
function buildRippleNode(index){
var ripple, title, bottomLetter, topLetter;
var offset = 180;
var pos = (offset * index) + offset; //radius of Home Button
var titleOffset = config.titleOffset;
var titleHeight = config.titleHeight;
ripple = paper.path("M0,0 L"+pos+",0 A"+pos+","+pos+" 0 0,1 0,"+pos+"z")
ripple.attr({'fill': COLORS[index], 'fill': URL[index], 'stroke': COLORS[index]})
.data('id', RIPPLE_ID[index]);
title = paper.text(pos - titleOffset, titleHeight, LABELS[index]).attr({'font-size': '24px', 'font-style': 'italic', 'opacity': 1});
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import json
import urllib2
import base64
import xml
import sys
import time
/*
Analog input, analog output, serial output
Reads an analog input pin, maps the result to a range from 0 to 255
and uses the result to set the pulsewidth modulation (PWM) of an output pin.
Also prints the results to the serial monitor.
The circuit:
potentiometer connected to analog pin 0.
Center pin of the potentiometer goes to the analog pin.