Skip to content

Instantly share code, notes, and snippets.

View bakercp's full-sized avatar

Christopher Baker bakercp

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bakercp on github.
  • I am bakercp (https://keybase.io/bakercp) on keybase.
  • I have a public key ASBZ3ejlA1s6ZG2RwP0zvfscT3WosEMIhaU7j_cR26xQmwo

To claim this, I am signing this object:

// Control PWM via a transistor.
class MotorController
{
public:
MotorController(int motorPin)
{
pin = motorPin;
startTime = endTime = millis();
@bakercp
bakercp / fhog_simd_ex.cpp
Created April 30, 2017 02:03
dlib SIMD tests
#include <dlib/image_io.h>
#include <dlib/image_transforms.h>
using namespace std;
using namespace dlib;
int main(int argc, char** argv)
{
@bakercp
bakercp / ConvexHull.cpp
Last active June 6, 2019 09:26
An openFrameworks convex hull / defect index finder using opencv (because there is a bug in the opencv version). bug https://github.com/opencv/opencv/issues/4954
//
// Copyright (c) 2017 Christopher Baker <https://christopherbaker.net>
//
// SPDX-License-Identifier: MIT
//
#include "ConvexHull.h"
@bakercp
bakercp / readme.md
Created November 8, 2016 16:13 — forked from max-mapper/readme.md
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@bakercp
bakercp / Logger.pde
Created October 20, 2016 14:03
A simple CSV data logger for Processing.
import processing.serial.*;
import java.text.SimpleDateFormat;
import java.util.Date;
Serial myPort;
int lineFeedChar = 10;
String lastRow = "";
int currentY = 0;
@bakercp
bakercp / VideoBuffer.sketch
Last active November 20, 2015 20:03
VideoBuffer
ofVideoGrabber grabber;
ofPixels filteredPixels;
ofTexture filteredTexture;
std::vector<ofTexture> buffer;
int numFramesInBuffer;
ofEasyCam cam;
@bakercp
bakercp / PlaySounds.sketch
Last active September 21, 2015 04:53
Sound Example
ofSoundPlayer dubstep; // From bensound.com
ofSoundPlayer ping; // From bensound.com
ofSoundPlayer pong; // From freesound.org.
ofSoundPlayer laser; // From freesound.org
void setup() {
dubstep.loadSound("bensound-dubstep.mp3");
dubstep.setVolume(0.75f);
dubstep.play();
@bakercp
bakercp / config.osx.default.mk
Last active September 21, 2015 00:41
Xcode 7 fix for ofSketch
##########################################################################################
# CONFIGURE CORE PLATFORM MAKEFILE
# This file is where we make platform and architecture specific configurations.
# This file can be specified for a generic architecture or can be defined as variants.
# For instance, normally this file will be located in a platform specific subpath such
# as $(OF_ROOT)/libs/openFrameworksComplied/linux64.
#
# This file will then be a generic platform file like:
#
@bakercp
bakercp / Ball.sketch
Created December 17, 2014 03:40
HelloWorld ofSketch Gist.
class Ball{
public:
ofVec2f position;
ofVec2f velocity;
int radius;
ofColor color;