Difference between revisions of "OpenCV Module in Slicer3"
Line 8: | Line 8: | ||
==Install OpenCV 1.0== | ==Install OpenCV 1.0== | ||
− | # Download OpeCV 1.0 at http://sourceforge.net/projects/opencvlibrary/files/ | + | # Download OpeCV 1.0 at http://sourceforge.net/projects/opencvlibrary/files/. You get file opencv-1.0.0.tar.gz |
− | You get file opencv-1.0.0.tar.gz | + | # Move the file to any temporary folder and then unzip it: '''tar xvfz opencv-1.0.0.tar.gz'''. You will get a directory called "opencv-1.0.0" |
− | |||
− | # Move the file to any temporary folder and then unzip it: | ||
− | |||
− | You will get a directory called "opencv-1.0.0" | ||
− | |||
# cd to opencv-1.0.0 and run these commands: | # cd to opencv-1.0.0 and run these commands: | ||
− | ./configure | + | ./configure |
− | make | + | make |
− | sudo make install | + | sudo make install |
− | The above commands will configure, compile and install opencv 1.0 on your system. | + | <br>The above commands will configure, compile and install opencv 1.0 on your system. |
==Test camera== | ==Test camera== |
Revision as of 18:13, 25 July 2009
Home < OpenCV Module in Slicer3Contents
Steps to Build and Use OpenCV Module
My operating system
The following Linux system is my desktop where this tutorial is based on:
Ubuntu 8.04 - the Hardy Heron - released in April 2008.
Linux brainlab-desktop 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux
Install OpenCV 1.0
- Download OpeCV 1.0 at http://sourceforge.net/projects/opencvlibrary/files/. You get file opencv-1.0.0.tar.gz
- Move the file to any temporary folder and then unzip it: tar xvfz opencv-1.0.0.tar.gz. You will get a directory called "opencv-1.0.0"
- cd to opencv-1.0.0 and run these commands:
./configure make sudo make install
The above commands will configure, compile and install opencv 1.0 on your system.
Test camera
1) My camera Logitech QuickCam Pro for Noteboks
2) If you don't have a tool called "luvcview," you can get it using this command: sudo apt-get install luvcview
3) Plug in the camera to any usb port on your computer
4) Run luvcview
In a few seconds you should see video displayed in luvcview
Compile Slicer3
I have created a Slicer3 (in trunk) module named "OpenCV," whose name was suggested by Dr. Noby Hata. It's basically the videoOpenIGTLink module plus a few bug fixes. To include this module into your Slicer3 build, open this file: Slicer3/Modules/CMakeLists.txt
and uncomment "OpenCV" (by default, it's commented for now because it depends OpenCV library)
Test the system
1) Plug in your camera into any usb port 2) Bring Slicer up 3) Go to the modules list in Slicer3 interface 4) Pick OpenCV module 5) Press the button "second window on"
You should see video from the camera in a few seconds.