Here is my code, i am not able to covert the mouth region into grayscale please help me...i have tried everything available on internet
Rect[] facesArray = faces.toArray();
for (int i = 0; i < facesArray.length; i++)
{
Imgproc.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(),
FACE_RECT_COLOR, 3);
Rect r = facesArray[i]; // / for each detected face
Rect moutharea = new Rect(r.x + (r.width * 2 / 7), r.y
+ (r.height * 2 / 3), r.width / 2, r.height / 4); // /
// extract
// mouth
Mat innerWindow = mRgba.submat(moutharea);
Imgproc.cvtColor(innerWindow,innerWindow, Imgproc.COLOR_RGB2GRAY);
Imgproc.threshold(innerWindow, innerWindow, 100, 255,Imgproc.THRESH_BINARY);