android-vision icon indicating copy to clipboard operation
android-vision copied to clipboard

Camera Source Preview Always Looks dark

Open kumardexati opened this issue 7 years ago • 3 comments

Preview Generated using CameraSource always seems to look very dark when Front camera is used. This can be experienced with GooglyEyes Test app too.

Test Phone used: Pixel XL.

kumardexati avatar Dec 05 '16 19:12 kumardexati

I also had the same issue with nexus 5 and I got it resolved by decreasing the frame rate. The default value is 30 fps. I changed it to 15 and worked fine for the device. You should consider changing frame rate.

mCameraSource = new CameraSource.Builder(context, detector)
                .setRequestedPreviewSize(width, height)
                .setFacing(camId)
                .setRequestedFps(15.0f)
                .setAutoFocusEnabled(shouldIUseAutofocus)
                .build();

However, check for the repercussions in other devices too!!

sudipidus avatar Jan 10 '17 07:01 sudipidus

@sudipbhandari126 How does frame rate relates to brightness of the preview? Is it a bad work from google guys, or something? I tried it and it works though.

Sevastyan avatar Oct 17 '18 14:10 Sevastyan

@Sevastyan I'm certainly no expert but I believe that maybe the FPS setting affects the shutter-speed and that would probably have an effect on the brightness/exposure

projectdelta6 avatar Jan 09 '20 06:01 projectdelta6