Monday, April 02, 2012
Real-time face detection with Android
In this post I will show you how to use the still image FaceDetector class from the Android SDK to achieve (mostly) real-time face detection. The following method was used in the creation of the MonkeyCam application.
Since its first release, the Android SDK has made available the FaceDetector class, which “identifies the faces of people in a Bitmap graphic object”. By using the FaceDetector on preview frames from the camera, we approximate the real-time face detection. For example in the MonkeyCam application we achieved a rate of slightly over one second per frame which is in the same range as other solutions found around the Internet using more complex solutions like third party computer vision libraries. Short of using the NDK to do GPU programming for the face detection algorithm this was a very usable compromise.
Read more »
Labels: Android, Face detection, FaceDetector, Mobile App, Mobile Application, Mobile Development, MonkeyCam, Smartphones
Disabling the console switching keys for Android
Some time ago I was doing development on an Android phone and using a BlueTooth keyboard I came across an intriguing behaviour. Hitting the Alt+Left or Alt+Right key combo, the phone would seemingly stop working and give all the symptoms of a frozen device, no more animated wallpaper and unresponsive touchscreen. This stems from a functionality inherited from Linux for the desktop. In this article I will describe the origin of the issue, how to recover from it and how it can be fixed at the kernel level.
Let's start with Alt+F1 through F12; these allow accessing the tty's. On a typical Linux installation Alt+F1 through F6 allows the user to switch between tty1 through tty6 respectively directly and Alt+F7 (F1 in Fedora) is a special tty in which the graphical interface runs. This can change from distro to distro.
Read more »
Background information
In Linux there exist some special key combinations that are handled at the kernel level. In this article we'll be looking at the console key combinations, specifically:- Alt+F1 through F12
- Ctrl+Alt+F1 through F12
- Alt+Left
- Alt+Right
Let's start with Alt+F1 through F12; these allow accessing the tty's. On a typical Linux installation Alt+F1 through F6 allows the user to switch between tty1 through tty6 respectively directly and Alt+F7 (F1 in Fedora) is a special tty in which the graphical interface runs. This can change from distro to distro.
Read more »
Labels: Android, Console, keymap, Linux