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 My Edited Picture from PS : I want this
Thank you So Much for Your Answer... :)