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 / blackbox.py
Created June 19, 2011 03:53
Black Box api sketch
class MyModule(ecto.BlackBox):
def __init__(self, start, step):
ecto.BlackBox.__init__(self)
self.generate = ecto_test.Generate(start=start, step=step)
self.inc = ecto_test.Increment()
def _outputs(self):
return {"out":self.inc["out"]}
def _parameters(self):
return {
"start":self.generate["start"],
#!/usr/bin/env python
#
# Simple vid cap
#
import ecto
import ecto.opts
from ecto_opencv import highgui, calib, imgproc
def video_capture_plasm(device=0, width=640, height=480):
usage: vidcap.py [-h] [-d,--device DEVICE_ID] [--width WIDTH]
[--height HEIGHT] [--scheduler SCHEDULER_TYPE]
[--nthreads NUMBER_OF_THREADS] [--niter ITERATIONS] [--shell]
Capture a video from the device and display it.
optional arguments:
-h, --help show this help message and exit
-d,--device DEVICE_ID
The device ID of a video camera. Take the number off
#!/usr/bin/env python
import ecto
from ecto_X import Source
from ecto_opencv.highgui import VideoCapture
video_cap = VideoCapture(video_device=0, width=640, height=480)
source = Source(port=2932)
plasm = ecto.Plasm()
plasm.connect(video_cap['image'] >> source['in'],
#!/usr/bin/env python
import ecto
from ecto_X import Sink
from ecto_opencv.highgui import imshow, FPSDrawer
video = Sink(url='localhost', port=2932)
fps = FPSDrawer()
video_display = imshow(name='video_cap', waitKey=2)
plasm = ecto.Plasm()
typedef enum
{
XN_IO_IMAGE_FORMAT_BAYER = 0,
XN_IO_IMAGE_FORMAT_YUV422 = 1,
XN_IO_IMAGE_FORMAT_JPEG = 2,
XN_IO_IMAGE_FORMAT_JPEG_420 = 3,
XN_IO_IMAGE_FORMAT_JPEG_MONO = 4,
XN_IO_IMAGE_FORMAT_UNCOMPRESSED_YUV422 = 5,
XN_IO_IMAGE_FORMAT_UNCOMPRESSED_BAYER = 6,
} XnIOImageFormats;
@ethanrublee
ethanrublee / sporesdecl.cpp
Created September 10, 2011 07:16
A sample of what spore decl might look like
struct Add
{
static void declare_io(const ecto::tendrils& p, ecto::tendrils& i, ecto::tendrils& o)
{
i.declare(&Add::left_,"left");
i.declare(&Add::right_,"right");
o.declare(&Add::out_,"out");
}
@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
@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 / 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