:dragon: Android app to demo dlib-android(https://github.com/tzutalin/dlib-android). Use the prebuilt shared-lib built from dlib-android
683
stars
246
forks
source link
How to Use Detector on Full Camera Image and How to Use Front-Facing Camera? #56
Open
mago3421 opened 5 years ago
Hi,
What code do I need to change in order to use the full-size image for the face detector and also for drawing the bounding box and landmarks?
I tried changing the face detector to use the full size bitmap as so:
//results = mFaceDet.detect(mCroppedBitmap);
results = mFaceDet.detect(mRGBframeBitmap);
However, the face detector is completely unable to detect a face. Please advise.
Also, do you know how I would change the code to use the front-facing camera? I'm very new to Android but found this suggested code snippet:
Intent launchIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA); launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); launchIntent.putExtra("android.intent.extras.CAMERA_FACING", android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT); launchIntent.putExtra("android.intent.extras.LENS_FACING_FRONT", 1); launchIntent.putExtra("android.intent.extra.USE_FRONT_CAMERA", true); startActivity(launchIntent);
Would this go under line 45 in CameraActivity.java?