Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Use Detector on Full Camera Image and How to Use Front-Facing Camera? #56

Open
mago3421 opened this issue Jul 10, 2019 · 0 comments

Comments

@mago3421
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant