Ask Your Question
1

Skin Color Detection on ROI Image on Android

asked 2013-02-17 01:02:24 -0600

baharsan gravatar image

Hi There, I Need your help to get solution. I have a source code that can detect right hand using Android. I work it with original source from android sample "face detector". with simple work, i can change that face detector to become right hand detector. this is android source to detect desired object :

 @Override
protected Bitmap processFrame(VideoCapture capture) {
    capture.retrieve(mRgba, Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA);
    capture.retrieve(mGray, Highgui.CV_CAP_ANDROID_GREY_FRAME);

    if (mCascade != null) {
        int height = mGray.rows();
        int handSize = Math.round(height * Isign.minHandSize);
        List<Rect> hand = new LinkedList<Rect>();
        mCascade.detectMultiScale(mGray, hand, 1.1, 2, 2 // TODO: objdetect.CV_HAAR_SCALE_IMAGE
                ,new Size(handSize, handSize));           
        for (Rect r : hand)
            Core.rectangle(mRgba, r.tl(), r.br(), new Scalar(255, 255, 255, 255), 3);
    }
    Bitmap bmp = Bitmap.createBitmap(mRgba.cols(), mRgba.rows(), Bitmap.Config.ARGB_8888);
    if (Utils.matToBitmap(mRgba, bmp))
        return bmp;
    bmp.recycle();
    return null;
}

So with this code :

for (Rect r : hand)
                Core.rectangle(mRgba, r.tl(), r.br(), new Scalar(255, 255, 255, 255), 3);

I can get ROI Image at every frame from video capture.

My Problem is :

How can i process that ROI Images (actually frame on the rect area) to real time skin detection and preview in android screen realtime also. so, maybe this image can descibe clearly what i want to do : (second picture edited by photoshop)

This Original Hand Detect

This Original Hand Detect

This My Edited Picture from PS : I want this

This My Edited Picture from PS : I want here

Thank you So Much for Your Answer... :)

edit retag flag offensive close merge delete

Comments

Finally it's done, thank you so much all member here and stackoverflow forum. this reference to get it done :

http://stackoverflow.com/questions/9443377/android-color-detection-using-opencv-how-to

baharsan gravatar imagebaharsan ( 2013-02-23 01:45:22 -0600 )edit

Hey! I am working on a similar project- making a gesture recognition app. Is it possible for you to share the source code of your application with me? It would really be a big help! Thanks :)

Niharika gravatar imageNiharika ( 2013-03-21 12:22:06 -0600 )edit
1

Can you pls share your xml for hand haar classifier? It'll be a big help for my above mentioned project :)

Niharika A gravatar imageNiharika A ( 2013-03-25 12:47:43 -0600 )edit
baharsan gravatar imagebaharsan ( 2013-04-14 21:21:32 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-02-17 01:32:52 -0600

berak gravatar image

one of the R1,R2,R3 methods here: http://www.bytefish.de/wiki/opencv/skin_color_thresholding will help

edit flag offensive delete link more

Comments

thank you, but that not enough for me, i also have more simple reference about your suggestion :

http://bsd-noobz.com/opencv-guide/60-4-skin-detection,

but some body please tell me how to do that in android. thanks full for who give me exact source to continue above source until get desired skin color detection

baharsan gravatar imagebaharsan ( 2013-02-17 02:52:16 -0600 )edit

Question Tools

Stats

Asked: 2013-02-17 01:02:24 -0600

Seen: 8,153 times

Last updated: Feb 17 '13