public void run() {
mFaceView.resetFaces();
mFaceView.resetShowX();
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inSampleSize = 4;
final Bitmap bmp = BitmapFactory.decodeByteArray(mJpegData, 0, mJpegData.length, opt);
mFaceView.setImageBitmap(bmp);
}
});
try {
Thread t = new Thread() {
public void run() {
for (int nSample = 16; nSample >= 8 && !mFaceView.hasFaces(); nSample /= 2) {
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inSampleSize = nSample;
final Bitmap bmp = BitmapFactory.decodeByteArray(mJpegData, 0, mJpegData.length, opt);
mRgbCurrent = RgbImageAndroid.toRgbImage(bmp);
mDhp.push(mRgbCurrent);
for (Enumeration<jjil.core.Rect> e = mDhp.getResult(); e.hasMoreElements();) {
jjil.core.Rect r = e.nextElement();
int nTop = (r.getTop() * mFaceView.getHeight()) / mRgbCurrent.getHeight();