cv.jit motion analysis

By Jean-Marc Pelletier

http://jmpelletier.com/cvjit/

Motion Analysis

cv.jit.opticalflow Estimates the optical flow using various algorithms.
cv.jit.LKflow Estimates the optical flow using the Lucas-Kanade technique.
cv.jit.HSflow Estimates the optical flow using the Horn-Schunk technique.
cv.jit.track Track the position of up to 255 individual pixels.
cv.jit.features2track Initialize cv.jit.track to easiest pixels to track.
cv.jit.framesub Difference between consecutive frames.
cv.jit.shift Region tracking using the MeanShift and CAMShift algorithms.
cv.jit.touches Track multiple regions at a time. (Optimized for multi-touch interfaces.)

 

Project examples:

http://www.yourepeat.com/g/cv.jit

 

green screen in Max

Live chroma-key example using the built-in camera.

Hacked from jitter help files…

download

https://github.com/tkzic/max-projects

folder: chroma-key

patch: greenScreen1.maxpat

instructions
  • click open (screen grab)
  • click read – to open a movie file
  • click start/stop toggle
  • in the grab viewer, select the background color to chromakey, by clicking with mouse
notes

This really works best with an external camera and a large monochromatic background.

components:

  • Max/MSP – Jitter
  • builtin camera

Web video streaming in Max

Stream realtime video from a web browser into Max or any program that uses Syphon.

CefWithSyphon (developed by Vibeke Bertelsen) launches a web browser and Syphon server. The Max patch operates a Syphon client that receives a video stream from the server and makes it available to Jitter objects.

 download

https://github.com/tkzic/max-projects

folder: web-video-streaming

patch: jit.gl.syphonclient.maxhelp

externals: 
  • jit.gl.syphonclient.mxo:

Note: externals are included with max-projects but can also be downloaded here: http://syphon.v002.info

other dependencies (app) 
  • CefWithSyphon.app

Download the CefWIthSyphon app from here:  https://github.com/vibber/CefWithSyphon – A Mac OS binary is available and has been tested with Mac OS 10.9.2

Instructions
  • Open the client example /jit.gl.syphonclient.maxhelp in  Max
  • Run the CefWithSyphon app. It will launch a browser
  • The browser content should now stream to the clientcontext window in Max 
  • If not streaming, click the “getavailableservers” message and select the correct server/client from menu objects outlined in red

 

How to get Youtube video into Max (jitter) using Syphon and Quartz

This method doesn’t work. Check out this link for a better way 5/2014

https://reactivemusic.net/?p=11371

Original post…

[another update – having issues with video noise in the quartz viewer 12/2013 – have tried various obvious things without success – overall this is kind of a kluge anyway]

An update to previous post

1. Read this post about QC + syphon

http://cycling74.com/forums/topic/using-jitter-to-display-a-website/

Have installed this plugin with Quartz Composer

http://code.google.com/p/cogewebkit/

Now have installed a Syphon server example in quartz with a youtube video. Load this file:

tkzic/quartz/GoGe WebKit RC3/Example Patches/GoGe Players/Webkit Stuff/SimpleBrowser syphon.qtz

Then run the client example Max help file from Syphon:

tkzic/syphon/Max 6 Help/jit.gl.syphonclient.maxhelp

You will need to add the folder with the syphon externals to your max file path – in my case:

tkzic/syphon/