Calico Emgu.CV

From IPRE Wiki
Revision as of 13:33, 7 April 2013 by Doug Blank (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page documents the use of the Emgu.CV library for accessing computer vision functions and a general interface to using webcams. It uses OpenCV.

Installation

  1. Download Emgu.CV
    1. http://sourceforge.net/projects/emgucv/?source=dlp
  2. Copy the low-level (machine-dependent) opencv_*.dll libraries to Calico's bin folder
    1. For example copy "C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\bin\x86\*.*" to C:\Calico\bin
  3. Copy the high-level (managed) libraries to Calico's module folder
    1. For example copy "C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\bin\*.dll" to C:\Calico\modules

Testing

In running these interactions, it if probably a good idea to NOT reset the shell when running a new Calico script.

In Calico when you have a program script (say, Python) open, go to menu -> Script -> Script Options and UNCHECK "Reset Shell on Run". This will not clear variables, and will allow the webconnection to remain continuous through your session.

After installation, you should be able to run the following:

# http://www.emgu.com/wiki/index.php/Camera_Capture_in_7_lines_of_code
import Emgu
viewer = Emgu.CV.UI.ImageViewer()
capture = Emgu.CV.Capture()
viewer.ShowDialog()

If that fails, perhaps you have the wrong architecture (32-bits vs. 64-bits). The 32-bit version should work for all Windows versions.

If that fails, then you may need to rebuild the Emgu.CV library for your platform via Mono. You can use MonoDevelop (or Xamarin Studio) to rebuild managed DLL libraries. Simple open the Emgu.CV solution (in the Solution folder) and rebuild all.

Examples

To be written...