create a waiting time
this is my bitmap:
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 faceSize = Math.round(height * FdActivity.minFaceSize);
//int faceSize = 40;
MatOfRect faces = new MatOfRect();
mCascade.detectMultiScale(mGray, faces, 1.1, 2, 2 // TODO: objdetect.CV_HAAR_SCALE_IMAGE
, new Size(faceSize, faceSize), new Size());
Rect[] e = faces.toArray();
for( int i=0; i<e.length;i++){
Core.rectangle(mRgba, e[i].tl(), e[i].br(), new Scalar(0, 255, 0, 255),3);
}
}// parentesi primo if
//uscita
Bitmap bmp = Bitmap.createBitmap(mRgba.cols(), mRgba.rows(), Bitmap.Config.RGB_565/*.ARGB_8888*/);
try {
Utils.matToBitmap(mRgba, bmp);
return bmp;
} catch(Exception e) {
Log.e("org.opencv.samples.puzzle15", "Utils.matToBitmap() throws an exception: " + e.getMessage());
return null;
}
}
I want to wait 5 seconds to copy the rectangle e[i] and work with him, how can I do? thanks.