background preloader

Introduction to programming with OpenCV

Introduction to programming with OpenCV

Install libfreenect Drivers on Ubuntu libfreenect is the end result of the famous Adafruit Kinect hacking bounty X-Prize winner. After it made its mark on the scene, the OpenKinect community was born and the rest is history. This guide will provide the resources necessary to install the OpenKinect libfreenect drivers for Ubuntu. The original installation guide can be found at OpenKinect's Getting Started Guide. We'll be performing the entire operation using a Terminal app. First up, upon up a Terminal. Installing Dependencies Type in the following to install the required dependencies and packages necessary to install libfreenect. sudo apt-get install git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev This will take a bit of time depending on your internet connection and if you need to install all of these dependencies. Install libfreenect Create a directory in Home called Kinect. mkdir ~/Kinect cd ~/Kinect Use git to download the latest version of libfreenect sudo glview

Face Detection and Face Recognition with Real-time Training from a Camera To improve the recognition performance, there are MANY things that can be improved here, some of them being fairly easy to implement. For example, you could add color processing, edge detection, etc. You can usually improve the face recognition accuracy by using more input images, atleast 50 per person, by taking more photos of each person, particularly from different angles and lighting conditions. If you cant take more photos, there are several simple techniques you could use to obtain more training images, by generating new images from your existing ones: You could create mirror copies of your facial images, so that you will have twice as many training images and it wont have a bias towards left or right. You could translate or resize or rotate your facial images slightly to produce many alternative images for training, so that it will be less sensitive to exact conditions. You could add image noise to have more training images that improve the tolerance to noise.

Getting started with Kinect on Ubuntu 12.04 – OpenNI, Nite , SimpleopenNI and Processing « ramsrigoutham The objective of this tutorial is - 1) To install OpenNI, Nite (drivers that help getting data from the kinect) in Ubuntu 12.04. 2) To set up Processing and SimpleOpenNI ( OpenNI and Nite wrapper for Processing ) using which you can get started with Kinect coding. What you need? Kinect with usb cable and a computer with Ubuntu installed. It is not recommended to run Ubuntu as a wubi installer from Windows when working with Kinect. 1) Installing OpenNI and NITE 1) I highly recommend installing 32 bit versions of all even if yours is a 64 bit system. Tip: Instead of navigating to different folders using cd command you can enable Open in terminal option when you right click in any folder. sudo apt-get install nautilus-open-terminal After installing type : killall nautilus && nautilus in terminal to activate the change immediately. Testing the installation: Connect the kinect and ensure that the green Led on it is blinking. . The output with my Kinect: 1)Download processing for Linux from here.

CameraCapture Here is a simple framework to connect to a camera and show the images in a Window. Sarin Sukumar A DSP Engineer - Information to control the camera parameters from program. User can control Output format of the camera (YUV2, RGB etc), Brightness, exposure, autofocus, zoom, white balance etc. I have done it for USB cam and OpenCV 2.0. bool CvCaptureCAM_DShow::open( int _index ) { '' * '' bool result=false; long min=0, max=0, currentValue=0, flags=0, defaultValue=0, stepAmnt=0; close(); #ifdef DEFAULT VI.deviceSetupWithSubtype(_index,640,480,_YUY2); #endif #ifdef MEDIUM VI.deviceSetupWithSubtype(_index,1280,1024,_YUY2); #endif #ifdef ABOVE_MEDIUM VI.deviceSetupWithSubtype(_index,1600,1200,_YUY2); #endif #ifdef HIGH VI.deviceSetupWithSubtype(_index,2048,1536,_YUY2); #endif //VI.showSettingsWindow(_index); //custome code if( ! “getVideoSettingFilter()” Make this line of code like this

Projections of Reality drive a webcam with python I bought a USB webcam off of eBay quite some time ago, and I decided to connect it to my telescope with a little bit of hardware hackery. I’ll have to see about posting a writeup on how I did that at a later time. Anyway, when I installed my camera software, I quickly found how horrible the program was. It gave a tiny preview of what the camera saw, and had no way of capturing images or video without waaaay too many clicks of the mouse. That’s when I decided to write my own in Python. The main libraries that I ended up using were VideoCapture, PIL, and pygame. Here’s the code: I decided to use pygame in order to build this because it can actually handle the fps that I need for video. A couple of noteworthy points: The function on line 15 is simply there to help automate displaying information on the screen. If you’re trying to write a webcam app of your own, I hope this gets you pointed in the right direction.

Capturing frames from a webcam on Linux :: Joseph Perla Not many people are trying to capture images from their webcam using Python under Linux and blogging about it. In fact, I could find nobody who did that. I found people capturing images using Python under Windows, and people capturing images using C under Linux, and finally some people capturing images with Python under Linux but not blogging about it. This instructional post I wrote to help those people who want to start processing images from a webcam using the great Python language and a stable Linux operating system. There is a very good library for capturing images in Windows called VideoCapture. It works, and a number of people blogged about using it. There are a number of very old libraries which were meant to help with capturing images on Linux: libfg, two separate versions of pyv4l, and pyv4l2. Finally, I learned that OpenCV has an interface to V4L/V4L2. Plus, OpenCV has very complete Python bindings. This is example utility code.

Installing OpenCV 2.2 in Ubuntu 11.04 – Sebastian Montabone Many people have used my previous tutorial about installing OpenCV 2.1 in Ubuntu 9.10. In the comments of that post, I noticed great interest for using OpenCV with Python and the Intel Threading Building Blocks (TBB). Since new versions of OpenCV and Ubuntu are available, I decided to create a new post with detailed instructions for installing the latest version of OpenCV, 2.2, in the latest version of Ubuntu, 11.04, with Python and TBB support. UPDATE: Now you can use my new guide to install OpenCV 2.4.1 in Ubuntu 12.04 LTS: First, you need to install many dependencies, such as support for reading and writing image files, drawing on the screen, some needed tools, etc… This step is very easy, you only need to write the following command in the Terminal Now we need to get and compile the ffmpeg source code so that video files work properly with OpenCV. The next step is to get the OpenCV 2.2 code: Now we have to generate the Makefile by using cmake. Now you have to configure OpenCV.