for detecting face reffering http://developer.android.com/reference/android/media/facedetector.face.html#. able find eye differece , midpoint .
i tracking eye positions following code :
public void trackeyes( bitmap picture_gray){ int width = picture_gray.getwidth(); int height = picture_gray.getheight(); // r e s z e bitmap t o o b t ai n e y e s roi. bitmap eyes_bitmap = bitmap.createscaledbitmap ( picture_gray , width , height, false ) ; // d e f n t o n o f c o l o r o f p u p l s . int pupilles_color = color.rgb ( 15 , 15 , 15 ) ; point eyes_left = new point ( ) ; point eyes_right = new point ( ) ; // b e gi n ni n g o f t r l o f r e s z e bitmap . for( int = 0 ; < eyes_bitmap.getheight( ) ; ++){ for( int j = 0 ; j < eyes_bitmap.getwidth( ) ; j ++){ // f p x e l s under c o l o r o f p u pil s , // t h t means eye found . if ( eyes_bitmap.getpixel( j , ) < pupilles_color ){ // f t s on l e f t s d e o f bitmap , // t s l e f t eye . if ( j < eyes_bitmap.getwidth ( ) / 2 ) { eyes_left.set ( j , ) ; } // e l s e t s r g h t eye . else if ( j > eyes_bitmap.getwidth ( ) / 2 ) { eyes_right.set(j ,i ) ; } } } } // c l c u l t o n s t o have p o s t o n o f e y e s n f u n c ti o n // o f o r g n l g r e y s c l e bitmap . eyes_right.set( eyes_right.x-(int)( width *0.1)+width / 2 , eyes_right . y-(int) (height*0.25)+ height ) ; eyes_left.set( eyes_left.x-(int ) ( width *0.1)+ width / 2 , eyes_left.y-(int ) ( height*0.25)+ height ) ; }
now need find locations of mouth . can me find locations of mouth ? advice of great .