• Stars
    star
    1,314
  • Rank 35,801 (Top 0.8 %)
  • Language
    Java
  • License
    Other
  • Created over 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OpenCV for Processing. A creative coding computer vision library based on the official OpenCV Java API

OpenCV for Processing

A Processing library for the OpenCV computer vision library.

OpenCV for Processing is based on OpenCV's official Java bindings. It attempts to provide convenient wrappers for common OpenCV functions that are friendly to beginners and feel familiar to the Processing environment.

See the included examples below for an overview of what's possible and links to the relevant example code. Complete documentation is available here:

OpenCV for Processing reference

OpenCV for Processing is based on the officially supported OpenCV Java API, currently at version 2.4.5. In addition to using the wrapped functionality, you can import OpenCV modules and use any of its documented functions: OpenCV javadocs. See the advanced examples (HistogramSkinDetection, DepthFromStereo, and Marker Detection) below for details. (This style of API was inspired by Kyle McDonald's ofxCv addon for OpenFrameworks.)

Contributions welcome.

Installing

OpenCV for Processing currently supports Mac OSX, 32-bit and 64-bit Windows, 32- and 64-bit Linux. Android support is hopefully coming soon (pull requests welcome).

NB: When running on the Mac, make sure you have Processing set to 64-bit mode in the Preferences

See here for the latest release.

Examples

LiveCamTest

Access a live camera and do image processing on the result, specifically face detection.

Code: LiveCamTest.pde

Note: There's a bug that prevents live camera access in current versions of Processing 2.0 on machines with a Retina display.

FaceDetection

Detect faces in images.

Screen Shot 2013-04-08 at 1.22.18 PM

Code: FaceDetection.pde

BrightnessContrast

Adjust the brightness and contrast of color and gray images.

brightness and contrast

Code: BrightnessContrast.pde

FilterImages

Basic filtering operations on images: threshold, blur, and adaptive thresholds.

Screen Shot 2013-04-12 at 1.42.30 PM

Code: FilterImages.pde

FindContours

Find contours in images and calculate polygon approximations of the contours (i.e., the closest straight line that fits the contour).

contours with polygon approximations

Code: FindContours.pde

FindEdges

Three different edge-detection techniques: Canny, Scharr, and Sobel.

Screen Shot 2013-04-10 at 2.03.59 AM

Code: FindEdges.pde

FindLines

Find straight lines in the image using Hough line detection.

Hough line detection

Code: HoughLineDetection.pde

BrightestPoint

Find the brightest point in an image.

finding the brightest point

Code: BrightestPoint.pde

RegionOfInterest

Assign a sub-section (or Region of Interest) of the image to be processed. Video of this example in action here: Region of Interest demo on Vimeo.

region of interest

Code: RegionOfInterest.pde

ImageDiff

Find the difference between two images in order to subtract the background or detect a new object in a scene.

Screen Shot 2013-04-11 at 2.10.35 PM

Code: ImageDiff.pde

DilationAndErosion

Thin (erode) and expand (dilate) an image in order to close holes. These are known as "morphological" operations.

dilation and erosion

Code: DilationAndErosion.pde

BackgroundSubtraction

Detect moving objects in a scene. Use background subtraction to distinguish background from foreground and contour tracking to track the foreground objects.

Background Subtraction

Code: BackgroundSubtraction.pde

WorkingWithColorImages

Demonstration of what you can do color images in OpenCV (threshold, blur, etc) and what you can't (lots of other operations).

color operations: threshold and blur

Code: WorkingWithColorImages.pde

ColorChannels

Separate a color image into red, green, blue or hue, saturation, and value channels in order to work with the channels individually.

ColorChannels

Code: ColorChannels

FindHistogram

Demonstrates use of the findHistogram() function and the Histogram class to get and draw histograms for grayscale and individual color channels.

gray, red, green, blue histograms

Code: FindHistogram.pde

HueRangeSelection

Detect objects based on their color. Demonstrates the use of HSV color space as well as range-based image filtering.

Hue-based color detection

Code: HueRangeSelection.pde

CalibrationDemo (in progress)

An example of the process involved in calibrating a camera. Currently only detects the corners in a chessboard pattern.

Screen Shot 2013-05-04 at 2.03.23 AM

Code: CalibrationDemo.pde

HistogramSkinDetection

A more advanced example. Detecting skin in an image based on colors in a region of color space. Warning: uses un-wrapped OpenCV objects and functions.

Screen Shot 2013-05-04 at 2.25.18 PM

Code: HistogramSkinDetection.pde

DepthFromStereo

An advanced example. Calculates depth information from a pair of stereo images. Warning: uses un-wrapped OpenCV objects and functions.

Screen Shot 2013-04-12 at 2.27.30 AM

Code: DepthFromStereo.pde

WarpPerspective (in progress)

Un-distort an object that's in perspective. Coming to the real API soon.

Warp Perspective

Code: WarpPerspective.pde

MarkerDetection

An in-depth advanced example. Detect a CV marker in an image, warp perspective, and detect the number stored in the marker. Many steps in the code. Uses many un-wrapped OpenCV objects and functions.

Screen Shot 2013-04-12 at 12.20.17 AM

Code: MarkerDetection.pde

MorphologyOperations

Open and close an image, or do more complicated morphological transformations.

Morphology operations

Code: MorphologyOperations.pde

More Repositories

1

rad

Ruby Arduino Development: a framework for programming the Arduino physcial computing platform using Ruby
Ruby
410
star
2

opencv-processing-book

An introduction to computer vision with OpenCV for Processing.
Processing
182
star
3

Making-Things-See-Examples

Kinect SimpleOpenNI Processing Examples from Making Things See
Java
124
star
4

drift

Cocoa app for creating and editing gists. Written in MacRuby.
Ruby
95
star
5

Processing-Shader-Examples

Experiments working with shaders in Processing. Click the link below for formatted notes.
Java
91
star
6

GitHub-Stoplight

Java
82
star
7

ofxUVC

OpenFrameworks addon for controlling UVC cameras
Objective-C
54
star
8

Makematics

Turning computer science research into maker tools.
Ruby
49
star
9

Skelestreamer

Streaming Kinect Skeleton Data to the web with Node.js
Java
49
star
10

FingerTracker

Processing library that performs real-time finger tracking from depth images.
Java
46
star
11

gestuRe

Simple Interactive Machine Learning system for recognizing hand gestures in Processing with OpenCV
Processing
32
star
12

llvm-avr

An AVR backend for LLVM
C++
30
star
13

ofxImageSequenceRecorder

A threaded image sequence recorder for OpenFrameworks
C++
29
star
14

ofxaddons.com

Web app for indexing OpenFrameworks addons
Ruby
25
star
15

Processing-SVM

Support Vector Machines library for Processing (based on libsvm)
Java
23
star
16

case-and-molly

Unity Game based on Neuromancer. For MIT Fall 2013: Science Fiction to Science Fabrication.
C
22
star
17

MacRuby-Document-App-Template

A template of a MacRuby Document-based app
Ruby
20
star
18

srender

John Resig's Simple Javascript Templating turned into a jQuery Plugin
JavaScript
18
star
19

pcl-poisson-example

Trying to get poisson reconstruction working with PCL
C++
17
star
20

Processing-Eigenfaces

An example of using the P-Eigenfaces Processing library to perform face recognition
Java
17
star
21

GeneratedDetective

My NaNoGenMo 2014 project: a generative detective comic
Processing
16
star
22

slipcover

treat a group of objects as a cluster with concurrent access. great for accessing couchdb clusters via CouchRest
Ruby
16
star
23

Processing-FSM

Simple Finite State Machine library for Processing
Processing
14
star
24

Biomechanic

The beginnings of a biomechanics visualization tool
Java
12
star
25

Processing-Isolines

Marching Squares implementation for Processing based on https://github.com/murphydactyl/JavaKinectFingerTracker/
Java
12
star
26

ofxPCA

OpenFrameworks addon for PCA dimensionality reduction technique
C
12
star
27

ITP-Resident-Examples

A collection of example code from the ITP Residents
11
star
28

Oscelerometer

demo of bridging accelerometer data into Unity via Arduino and Processing with OSC
Java
11
star
29

couchengine

CouchDB-resident app framework
Ruby
11
star
30

Processing-Convex-Hull

An example of finding the convex hull containing a set of points. Algorithm from Computational Geometry by de Berg, et al
Java
11
star
31

pcl-marching-squares-example

C++
10
star
32

Processing-PCA

Principal Component Analysis Toolkit for Processing
Java
10
star
33

arduino

a mirror of the arduino svn repo for git users
Java
10
star
34

Processing-DynamicProgramming

An implementation of the Dynamic Programming optimized search technique as well as a series of applications that take advantage of it such as image seam carving and textual sequence alignment.
Java
10
star
35

ofxGLM

Wrapper for working with the GLM (GLSL-style mathematics) library in OpenFrameworks
C++
9
star
36

dm-fql-adapter

FQL Adapter for DataMapper
Ruby
9
star
37

MoAD-Transcript

A shot-by-shot transcription of the Mother of All Demos
Ruby
9
star
38

couchblog

blog system built on CouchDB and Couch Engine that will power the CouchDB-PDX site
JavaScript
9
star
39

jmacs

user-modifiable network-aware editor in javascript and REST
JavaScript
9
star
40

couchdb

Adding some app-server like functionality to CouchDB.
Erlang
8
star
41

ofxMarchingCubes

Marching Cubes addon for OpenFrameworks (original code by Rui Peirera)
C++
8
star
42

chesscomputer

Python
7
star
43

templarx

templatize archaeopteryx drum definition files to control arx via other ruby codes
Ruby
7
star
44

bike_mountain_speedometer

firmware from my pcomp final
7
star
45

ruby_arduino_projects

My RAD projects for other people to learn from and me not to lose
7
star
46

gas

ruby wrapper for the GoogleAuthSub API
Ruby
6
star
47

ReCode_Project

An active archive of computer art.
Java
6
star
48

kinograph-FrameProcessor

Suite of Processing sketches for extracting frames from scanned film stock
Processing
6
star
49

Don-t-Lose-Your-Shit

ITP Drive-By on Version Control and Backups
6
star
50

ofxProgressBar

Simple visual progress bar addon for OpenFrameworks
C++
6
star
51

bother

One page framework for teaching bot-making.
JavaScript
5
star
52

processing-little-planets

Port of Notlion's awesome streetview pano interface to Processing https://github.com/notlion/streetview-stereographic
Processing
5
star
53

spiffy-bird

bridge between the Songbird music player webpage API and the JSON Shareable Playlist Format
JavaScript
5
star
54

1-Axis-Motion-Control-Move

syncing processing-controlled arduino with 3d-rendered video from After Effects
Java
5
star
55

ofxANN

An OpenFrameworks addon for libANN: Approximate Nearest Neighbor Search
Objective-C
5
star
56

SegmentedPuppet

An OpenFrameworks app for puppeting a segmented 3D figure model with the Kinect skeleton
C++
5
star
57

kaggle-titanic

Working on the Kaggle Titanic Survival Competition, mainly in OpenCV for Processing. Also using this use case to drive API development for wrapping OpenCV ML algos in Processing.
Processing
5
star
58

MeshShaderEffects

Demonstrating some simple effects using a shader on an ofMesh
C++
4
star
59

Head-Puppet

Open Frameworks app for distorting a 3D model of my head based on Kinect skeleton tracking data over OSC
C
4
star
60

gaggle

jquery plugin for the google ajax search api
JavaScript
4
star
61

Unfollowbot

MacRuby app to help you unfollow people on Twitter (jump started by the Peepcode MacRuby screencast)
Ruby
4
star
62

GreenScreen

OpenFrameworks app that green screens together the images from 3 usb cameras
C++
4
star
63

FromHellerizer

Processing sketch that uses modified versions of Dan Shiffman's Path and Vehicle classes (along with JavacvPro) to turn an image into the style of Eddie Cambell's drawings in From Hell
Java
4
star
64

animatedDiff

Processing sketch for creating an animated GIF displaying before and after changes to an image
Processing
4
star
65

ImageToSyphon

Demo of sending an NSImage to Syphon in Cocoa
Objective-C
4
star
66

Processing-ParticleFilter

Interactive Particle Filter localization demo in Processing
Java
4
star
67

Making-Things-See

Kinect and the Coming Vision Revolution
4
star
68

opencv-iml

Helper code and examples for using OpenCV for machine learning with Processing
Processing
4
star
69

Processing-CoreNLP-example

Basic example of getting CoreNLP working in Processing for Named Entity Recognition
Processing
4
star
70

order-matters

An exploration of anchoring bias in machine learning labeling, particularly recommender systems
CSS
4
star
71

Cinemagrapher

OpenFrameworks app to create cinemagraph-style animated GIFs
C
4
star
72

ofSSAO-DOF

Screen Space Ambient Occlusion and Depth of Field with shaders and FBOs in OF007
C++
4
star
73

d3-csv-demo

4
star
74

grouter

the thing what goes between bricks
JavaScript
4
star
75

Color

sinatra datamapper example app
Ruby
4
star
76

morphological-skeletonization

Example of performing morphological skeletonization with OpenCV for Processing
Processing
4
star
77

facemover

Extending "mover events" from Ullman, S., Harari, D., Dorfman, N. (2012) to bootstrap robust face-tracking. Implemented in Processing.
Processing
3
star
78

tumblamathing

JavaScript
3
star
79

Leg-Visualization

OF app to visualize leg movement data from Biomechanics and Motor Control of Human Movement by David A. Winter
C
3
star
80

ImageExtractor

OF app that that extracts images from documents
C++
3
star
81

KAMAS

Kinect Abnormal Movement Assessment System
Java
3
star
82

TabSweeper

Ruby
3
star
83

dog_catcher

Find and cleanly shut down any and all mongrels running on your system
Ruby
3
star
84

ScanSimplifier

OpenFrameworks application exploring simplifying point clouds
C++
3
star
85

gwidget

the flash widget
ActionScript
3
star
86

itp-camp-kinect

code from Kinect intro class at ITP camp
Java
3
star
87

KinectTheDots

Drawing-based occupational therapy app with the Kinect and the Mona Lisa
C++
3
star
88

Landman

Performance visualization that uses Kinect mesh data as the source for a Bullet physics world simulation
C++
3
star
89

CSVtoXML

naively convert a CSV file to XML using faster_csv
Ruby
3
star
90

Podcustom

Sinatra app that generates a custom podcast feed for you based on mp3 URLs you give it
Ruby
3
star
91

Giggle

js wrapper for google ajax search api
JavaScript
3
star
92

ProcessingGraphNeighbors

demo of finding neighbors of a graph in processing
Processing
3
star
93

blu

parser for the .blu sound-description format for _why's bloopsaphone
Ruby
2
star
94

drive-by-demo

2
star
95

bloopsbank

Library of cool sounds for Bloopsaphone
2
star
96

ruby-blogger

Ruby wrapper for the blogger api
2
star
97

stories

2
star
98

of-pcl-example

Example of using satoruhiga/ofxPCL
C++
2
star
99

MySauceIsTomatoBased.com

2
star
100

Skeletor

Processing sketch that posts Kinect skeleton data to CouchDB
2
star