Skip to content

Instantly share code, notes, and snippets.

View ethanrublee's full-sized avatar

Ethan Rublee ethanrublee

  • Watsonville, Ca
View GitHub Profile
@ethanrublee
ethanrublee / stopmotion.py
Last active September 15, 2020 00:13
Teaching the kids how to code and make stop motion animations!
import numpy as np
import cv2
import argparse
import os
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument('dev', help='video device')
parser.add_argument('out', help='output folder')
args = parser.parse_args()
@ethanrublee
ethanrublee / brief.cc
Created May 15, 2016 07:35
Basic implementation of the BRIEF descriptor.
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
import ecto
import numpy as np
class ClusterDetector(ecto.Cell):
def declare_params(self, params):
params.declare("n", "Max number of clusters.", 10)
def declare_io(self, params, inputs, outputs):
outputs.declare("clusters", "Clusters output. list of tuples", [])
def process(self, inputs, outputs):

Coding Standards / Best Practices

Readable, solid code is our livelihood and a matter of professional courtesy. The code is not yours to maintain, it is everybody's. Others will have to read it. Don't make your coworkers lose a day debugging your code just because you were undisciplined.

Sutter/Alexandrescu/Meyers/Boost

@ethanrublee
ethanrublee / dynamic_out.py
Created December 2, 2012 17:54
test dynamic output declaration in python ecto cells.
import ecto
class FanCell(ecto.Cell):
def declare_params(self, p):
p.declare("N", "number of outputs", 3)
def declare_io(self, p, i, o):
for i in range(p.N):
o.declare("out%d"%i, "output %d"%i, None)
#!/usr/bin/env python
import ecto
from ecto_opencv.highgui import imshow
from image_pipeline.io.source import create_source
import sys
import argparse
from ecto_opencv import cv_bp
import numpy as np
@ethanrublee
ethanrublee / gist:1674188
Created January 25, 2012 02:14
using catkin for workspace dependency introspection.
WORKSPACE=`pwd`
distro_url=https://raw.github.com/willowgarage/rosdistro/master/fuerte.yaml
curl -s $distro_url > distro.yaml
deburls=$(python -c "import yaml; print '\n'.join([x['url'] for x in yaml.load(open('distro.yaml'))])")
cd $WORKSPACE
for x in $deburls
do
dirname=$(basename ${x%.git})
@ethanrublee
ethanrublee / strand.bt.txt
Created October 31, 2011 19:16
strand fail on lucid boost 1.40
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
what(): mutex: Invalid argument
Program received signal SIGABRT, Aborted.
0x00007ffff51f8a75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0 0x00007ffff51f8a75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff51fc5c0 in *__GI_abort () at abort.c:92
@ethanrublee
ethanrublee / ecto-dev.yaml
Created September 29, 2011 19:37
rdmanifest brainstorm
meta:
package: ecto
description-brief: Ecto
description-full: 'A framework for creation of pipelines.'
homepage: http://ecto.willowgarage.com
maintainer: Ethan Rublee erublee@willowgarage.com
variations: [release, debug, cuda]
dependencies:
rosdeps:
urls:
@ethanrublee
ethanrublee / readme.rst
Created September 23, 2011 02:27
readme build system

image_pipeline

Core C++ functionality for image_pipeline.

  • Camera Models
  • Calibration routines including writing and reading from disk
  • Camera interface conventions
  • Project routines
  • Rectification routines