Tuesday, June 16, 2015

Android Face detection using FaceDetector


FaceDetector is a class provided by the android sdk.
It identifies the faces of people in a Bitmap graphic object.
For reference view Android Devloper.

Here I will be showing how to use this using the below code snippet.

/* img_btmp is the bitmap with or without faces. Note the width of the img_btmp should be even*/
FaceDetector detector = new FaceDetector(img_btmp.getWidth(), img_btmp.getHeight(), 10);

Face[] faces =  new Face[10];

// faces is the array where the detected faces will be stores
int face_detected_count=detector.findFaces(img_btmp, faces);

This doesn't seems to work well but still it can be used .It still needs further more development


Python: INSTALL pycharm in ubuntu

pycharm is a good editor tool for python.It comes in 2 edition

1.Community edition (Free!!)
2.Professional edition (that you can purchase).

STEPS TO INSTALL:

Step1: First of all pycharm needs JVM (Which is obvious) .You can check this as follows

ab@Boxx:~$ java –version

If you are not able to find any java versions just run the below command

sudo apt-get update
sudo apt-get install openjdk-6-jre-headless

Step 2: Now lets install pycharm

//create a folder in opt
mkdir -p ~/opt/packages/pycharm 
//Navigate to that folder
cd ~/opt/packages/pycharm
//Download the archive file of pycharm
wget http://download.jetbrains.com/python/pycharm-community-4.0.4.tar.gz
//Extract the file
gzip -dc pycharm-community-4.0.4.tar.gz | tar xf -
//Install
ln -s ~/opt/packages/pycharm/pycharm-community-4.0.4 ~/opt/pycharm
DONE! Now open pycharm using
~/opt/pycharm/bin/pycharm.sh

.htaccess display error pages on http errors

In your htaccess file add the below lines and save to show error pages on Http errors (404, 403 etc) ErrorDocument 403 /errors/404.html ...