Euglena tracking and OSC broadcasting: Difference between revisions

From Medien Wiki
(Created page with "Quick and dirty Euglena tracking using OpenCV, Syphon, and OSC. * Full source: File:TrackEuglenaSyphonOSC.zip‎")
 
No edit summary
Line 1: Line 1:
Quick and dirty Euglena tracking using OpenCV, Syphon, and OSC.  
== Quick and dirty Euglena tracking using OpenCV, Syphon, and OSC. ==
* Full source: [[File:TrackEuglenaSyphonOSC.zip‎]]


* Full source: [[File:TrackEuglenaSyphonOSC.zip‎]]
 
=== Threshold based Euglena detection ===
<source lang="java">
opencv.loadImage(cam);
 
opencv.gray();
opencv.invert();
threshold = int(map(mouseX,0,width,0,255));
 
opencv.erode();
opencv.dilate();
   
opencv.threshold(threshold);
</source>

Revision as of 09:21, 7 June 2015

Quick and dirty Euglena tracking using OpenCV, Syphon, and OSC.


Threshold based Euglena detection

opencv.loadImage(cam);

opencv.gray();
opencv.invert();
threshold = int(map(mouseX,0,width,0,255));

opencv.erode();
opencv.dilate();
    
opencv.threshold(threshold);