Robust Text Detection with Edge Enhanced MSER

Standard

Sorry for the shilling, but here’s my upcoming project:

https://plusplusone.herokuapp.com

Please register your email address if you’re interested in it.


 

This is implementation of Chen, Huizhong, et al. “Robust Text Detection in Natural Images with Edge-Enhanced Maximally Stable Extremal Regions.” [1]. Partly based on the sample available on Matlab [2]. Continue reading

Visualizing Hough Transform

Standard

I won’t go into Hough Transform, since you can find better explanations elsewhere, and it seems like most people at least get the basic idea behind it. But here’s something I whipped out for fun (well, I was reading Fast Symmetry Detection using Hough Transform, and I’d never written Hough from scratch before), visualizing the Hough lines, along with the accumulation matrix, which represents the (r, theta) space.

Continue reading

SLIC Superpixels on OpenCV

Standard

Sorry for the shilling, but here’s my upcoming project:

https://plusplusone.herokuapp.com

Please register your email address if you’re interested in it.


 

Here’s a sample implementation of SLIC (Simple Linear Iterative Clustering) Superpixel algorithm using OpenCV, C++, and Intel TBB. It’s an adaptation of Pascal Mettes’ version which you can find over here: https://github.com/PSMM/SLIC-Superpixels

Continue reading

Non Rigid Face Tracking

Standard

I rewrote the Non Rigid Face Tracking code by Jason Saragih (http://jsaragih.org/), which is published in the book “Mastering OpenCV with Practical Computer Vision Projects”. Copyright Packt Publishing 2012. (http://www.packtpub.com/cool-projects-with-opencv/book)

Mainly because I want to understand how it works, and partly because I wanted to clean up the code (which is arguably kind of messy). Continue reading

Structure From Motion using Farneback’s Optical Flow Part 2

Standard

Here’s another example of structure from motion from 2 camera using Farneback’s optical flow, sample codes included.

Basically, rather than using SIFT to extract key points, or to use Lucas Kanade’s sparse optical flow, we use a Farneback’s dense optical flow to show the transformation of key points between two images.

Continue reading

Image segmentation using OpenCV’s Expectation Maximization

Standard

Sorry for the shilling, but here’s my upcoming project:

https://plusplusone.herokuapp.com

Please register your email address if you’re interested in it.


 

Here’s sample implementation of OpenCV’s Expectation Maximization (EM) that I pilfered out of StackOverflow: http://stackoverflow.com/questions/12490256/opencv-color-extraction-based-on-gaussian-mixture-model Continue reading

Configuring Sublime to work with OpenCV on Mac

Standard

Sorry for the shilling, but here’s my upcoming project:

https://plusplusone.herokuapp.com

Please register your email address if you’re interested in it.


So, I just bought Sublime Text from http://www.sublimetext.com, which is supposed to be a very good cross platform text editor. I’ve been programming OpenCV applications using XCode, but rarely using editor or even compiling it from command line.

However, after tinkering a bit, I’ve managed to create a this built system for Sublime, which should allow you to compile and run OpenCV / C++ application from it. Just go to Tools > Build System > New Build System

My OpenCV was installed using HomeBrew, which has pkg-config information for opencv already created inside /usr/Local/Cellar/opencv/2.4.4/lib/pkgconfig/, thus you can utilize pkg-config to generate the include and library flags for g++ from it.

Continue reading

Simple head tracking

Standard

This is a very simple head-tracking using OpenCV and only Viola Jones’ face detection framework.

Basically the idea is to use face / head tracking to create an immersive 3D experience. This, is of course is still a very early prototype.

I whipped this up in less than an hour, so it’s very dirty and lack of any optimization. You can make the whole thing faster using CamShift algorithm, and some cleanup on the OpenGL codes.

Have fun ! Continue reading

Augmented Reality

Standard

Here’s another of my small projects. Basically it’s just a small Augmented Reality program, it loads OBJ file and show the 3d object on a given marker using OpenCV.

Here’s the code which have been extended to a crappy ‘swat the mosquito’ game : https://www.dropbox.com/s/gaj3xd0oo8vuzdl/AugmentedReality.zip. But you can still salvage the code and see how the whole thing works.

Kinect-based Medical Image Viewer

Standard

This is from one of my master project. So what happened is that, My supervisor and I talked about how to leverage the use of Kinect in operating rooms, providing a hands free solution (thus more sterile) for surgeons when viewing thru X-Rays or MRI images. It was my first foray into OpenCV and OpenNI (open source SDK for Kinect).

In nutshell the application operates like this:

  • Use OpenNI to obtain skeleton and joint data from Kinect, from which I know the positions of wrists, shoulder, etc.
  • Since we know the position of wrist, I can roughly approximate where the palms are. So rather than trying to detect from the whole image, I detect the appearance (or the lack of) fingers in that region.
  • OpenCV is used to extract the hand region, apply polylines, and check the convexity of that shape. Thus I can figure out whether I am making a knuckle or open palm gesture.
  • The images is shown using OpenGL (and if I remembered correctly I used VTK / DICOM libraries to extract the MRI images)
  • I added some logic to emulate finger gestures on mobile phones, but this time using the palms instead. Each closed palm gesture is treated as if you’re holding down a mouse button, and open palm means letting the button go.

Here’s the first prototype to show that I could detect fingertips

Then it was extended so that it could manipulate images