Categories
3d code graphics opencv programming vision

Kinect and OpenCV 2.1

Hi
Another quicky on how to use Kinect (libfreenect) with OpenCV 2.1. I already saw people do it, but havn’t seen code.
UPDATE (12/29): OpenKinect posted very good C++ code of using libfreenect with OpenCV2.X APIs: here it is. Plus, their git repo now has a very clean C code: here it is.
So here it goes

Categories
electronics Solutions

Hacking together a Kinect port

Hi,

Just a quicky on how I hacked together a DIY Microsoft Kinect port. The Kinect port is non standard, USB-like port, and to actually connect it to a PC you must buy an adapter from microsoft for >30$. This is whack. You should make your own. All you need is access to a lasercutter, vinylcutter, plexiglass 1/8″, some copper sheet and solder equip.

Categories
3d code graphics opencv opengl programming video vision

20-lines AR in OpenCV [w/code]

Hi,
Just wanted to share a bit of code using OpenCV’s camera extrinsic parameters recovery, camera position and rotation – solvePnP (or it’s C counterpart cvFindExtrinsicCameraParams2). I wanted to get a simple planar object surface recovery for augmented reality, but without using any of the AR libraries, rather dig into some OpenCV and OpenGL code.
This can serve as a primer, or tutorial on how to use OpenCV with OpenGL for AR.
Update 2/16/2015: I wrote another post on OpenCV-OpenGL AR, this time using the fine QGLViewer – a very convenient Qt OpenGL widget.
The program is just a straightforward optical flow based tracking, fed manually with four points which are the planar object’s corners, and solving camera-pose every frame. Plain vanilla AR.
Well the whole cpp file is ~350 lines, but there will only be 20 or less interesting lines… Actually much less. Let’s see what’s up

Categories
Android Recommended Software Solutions Stream tips

An Android solution for listening to online radio while multitasking

Android + Yourmuze.fm + Dolphin Browser HD + XiiaLive = WIN

It’s been a while since I’ve posted anything in the blog… Sorry for that… very busy times. I had a lot of ideas of what my “comeback post” should be about, but I knew I had to share one of my relatively recent discoveries that made my smartphone online-radio listening experience a whole lot better
If you don’t know yourmuze.fm, this might be the time to get to know it. It’s a free service that has a LOT of worldwide radio stations available as an online stream for usage with most of the smartphones.
In order to start using it you need to register for free via your desktop computer, and add the stations you like. Later on, you can surf to the mobile version of the service by mobile web and listen to the stations you selected.
So far so good… I like it. But how about multitasking?

Categories
Android code Java opencv programming vision

OpenCV2.1 on Android quickey with Haar object detection [w/ code]

Hi!
Long time no post… MIT is kicking my ass with work. But it was amazing to come back to so many comments with people anxious to get OpenCV going mobile!
Anyway, just wanted to share my work on object detection using OpenCV2.1 on the Android.

Categories
code graphics gui opencv programming tips

Combining OpenCV 2.x and Microsoft WPF [w/ code]

Hi,
Just a quicky about OpenCV and Windows Presentation Framework interoperability. It’s really easy with a simple Managed C++ wrapper. What I’ll show is how to transfer an OpenCV cv::Mat into WPF’s BitmapSource. Let’s see how it’s done.

Categories
code graphics gui opencv programming Recommended school vision Website

Image Recoloring using Gaussian Mixture Model and Expectation Maximization [OpenCV, w/Code]

Hi,
I’ll present a quick and simple implementation of image recoloring, in fact more like color transfer between images, using OpenCV in C++ environment. The basis of the algorithm is learning the source color distribution with a GMM using EM, and then applying changes to the target color distribution. It’s fairly easy to implement with OpenCV, as all the “tools” are built in.
I was inspired by Lior Shapira’s work that was presented in Eurographics 09 about image appearance manipulation, and a work about recoloring for the colorblind by Huang et al presented at ICASSP 09. Both works deal with color manipulation using Gaussian Mixture Models.
Update 5/28/2015: Adrien contributed code that works with OpenCV v3! Thanks! https://gist.github.com/adriweb/815c1ac34a0929292db7
Let’s see how it’s done!

Categories
code graphics opencv programming Solutions video vision

Iterative Closest Point (ICP) for 2D curves with OpenCV [w/ code]

ICP – Iterative closest point, is a very trivial algorithm for matching object templates to noisy data. It’s also super easy to program, so it’s good material for a tutorial. The goal is to take a known set of points (usually defining a curve or object exterior) and register it, as good as possible, to a set of other points, usually a larger and noisy set in which we would like to find the object. The basic algorithm is described very briefly in wikipedia, but there are a ton of papers on the subject.
I’ll take you through the steps of programming it with OpenCV.

Categories
code graphics opencv programming Recommended vision Website

Bust out your own graphcut based image segmentation with OpenCV [w/ code]

This is a tutorial on using Graph-Cuts and Gaussian-Mixture-Models for image segmentation with OpenCV in C++ environment.
Update 10/30/2017: See a new implementation of this method using OpenCV-Python, PyMaxflow, SLIC superpixels, Delaunay and other tricks.
Been wokring on my masters thesis for a while now, and the path of my work came across image segmentation. Naturally I became interested in Max-Flow Graph Cuts algorithms, being the “hottest fish in the fish-market” right now if the fish market was the image segmentation scene.
So I went looking for a CPP implementation of graphcut, only to find out that OpenCV already implemented it in v2.0 as part of their GrabCut impl. But I wanted to explore a bit, so I found this implementation by Olga Vexler, which is build upon Kolmogorov’s framework for max-flow algorithms. I was also inspired by Shai Bagon’s usage example of this implementation for Matlab.
Let’s jump in…

Categories
Uncategorized

Congratulations! Roy is going to MIT

I would like to congratulate my friend Roy, who got accepted to M.I.T in the Program in Media Arts and Sciences.
Starting this September, Roy will be spending the next two years in Boston.
I wish him all the best and luck.
I’m sure this degree will provide some interesting posts to this blog