Face Detection using OpenCV Haarcascades in Android

I was working on this app which required face detection and pose estimation. I was already using Native code for some other processes (edge detection, etc) so I figured I’d use Haarcascades in native code only. It was a bit of hassle to configure how to send xml file to JNI or whether it would load the cascade once I pass the filename to the native code.

»
Posted in Android

Pass Bitmap Data Between Activities in Android

I was making an application where I chose image file using browser intent and process it using OpenCV NDK. I decided to keep a different Activity for the OpenCV part and hence I had to pass the bitmap data from my main Activity to the OpenCV part activity. I had written an application before where I starting one intent from another activity. But I did not know how to pass arguments to the new activity. I looked up on Google and found out how to call another activity and then how to pass required data.

»
Posted in Android

Adding Logs in JNI Code

I am working with NDK and Android so sometimes I need to debug the native code to see if it’s working properly or not. I wanted something similar to Android’s Log function.

»
Posted in Android

Working with Toast Messages

I was working on an android application where I required some notification kind of thing. I was looking into popups but it didn’t really work out. Then I stumbled on to Toast Messages.

»
Posted in Android

Using C++ OpenCV code with Android

It’s been five months since I have written a blog post. I was not too busy to write it, but just enjoying my last semester at the campus. I’m currently pursuing my thesis at Tesseract Imaging and have been working with Android OpenCV for some time. Although I don’t know much about it, I know enough to do my work. I’m going to write about how to use Native Development Kit (NDK) to use C++ OpenCV code with Android. I keep having issues with my Linux distro and have to change it often so I have to reconfigure the whole Eclipse Android settings.

»
Posted in Android

SLIC based Superpixel Segmentation

It’s been two months since I have written about my work. Well, to be honest, I didn’t do that much work which could be put up on a blog. I am working on a 3D application which is based on Android and when I get a chance, I’ll post about it. Meanwhile, I am also working with SimpleCV as part of my Google Summer of Code 2013 prgoram. For the mid term, I was working on porting it to cv2 and cleaning up the legacy code. I need to write a post about all the updates and new features that it will have. One of the features that I am planning to add is Superpixels based on SLIC algorithm.

»
Posted in Computer Vision

Capture images using V4L2 on Linux

I have always been using OpenCV’s VideoCapture API to capture images from webcam or USB cameras. OpenCV supports V4L2 and I wanted to use something other than OpenCV’s VideoCapture API so I started digging up about v4l2 and got few links using and few examples using which I successfully wrote a small code to grab an image using V4L2 and convert it to OpenCV’s Mat structure and display the image.

»
Posted in Open Source

Why SimpleCV Should move away from OpenCV Python's Legacy Module

Current OpenCV version is 2.4.5 and although it has almost all the Python bindings, it still lacks some of the latest development, but that’s not the issue here. OpenCV Python bindings still support the Legacy code (i.e. cv module), but no one knows when they will deprecate it. We need to move away from Legacy module as soon as possible. I have been supporting this idea for quite a while now because I have faced so many problems. I insist on using new module and it requires numpy and there’s so much hassle of converting column major bitmap image to row major numpy matrix and back to display proper image. Since SimpleCV is moving to 2.0 and have big plans, see SimpleCV 2.0 Plans, I think this should be the part of it and I can’t think of any better opportunity to implement it than this. I have listed some pros and cons.

»
Posted in Python

Fingertips detection using Kinect

In my previous post, I have shown how to use Kinect with OpenCV using Freenect library.Siddharth and I have been working on Kinect for gesture recognition and so far we are able to detect fingertips using contours and hull.

»
Posted in Computer Vision

Numpy Tips and Tricks

Lately I have been using numpy way too much and there’s no point in doing things non-pythonic way so I always look for some cool tricks using which I can increase the speed and get the correct output. I require numpy basically for Image Processing and Computer Vision. I always forget these tips and have to look up again on stackoverflow, so I am compiling a list of all such tricks that I have used.

»
Posted in Python

Kinect with OpenCV using Freenect

I recently got a Kinect to work on at my sumemr internship at Ducere Technologies. Having heard so much about OpenNI, I tried installing it on my Ubuntu 12.04 LTS 64 bit machine. It took some time to configure, build and install it. I got help from few blogs. I managed to install it somehow. Connected the kinect and fired up the demo program and ran into troubles. I was getting following error.

»
Posted in Computer Vision

SimpleCV - Google Summer of Code 2013

I had proposed a project for SimpleCV in this year’s Google Summer of Code and it has been accepted. This year my project is concentrated on improving SimpleCV’s core functionalities and adding support for shape matching and detection which is one of the most important purposes of Machine Vision in industrial automation.

»
Posted in Computer Vision