前置摄像头采取的android很暗捕获 [英] front camera take very dark capture in android
本文介绍了前置摄像头采取的android很暗捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用前置摄像头使用我的自定义相机应用不使用系统相机照片拍摄app.But拍摄的照片很暗,以便能够正确地看到照片。
I am taking photo capture using front camera using my custom camera app not using system camera app.But the captured photo is very dark so can see photo properly.
我的code
mCamera = Camera.open(1);
Camera.Parameters params =mCamera.getParameters();
params.setSceneMode(Camera.Parameters.SCENE_MODE_NIGHT);
mCamera.setParameters(params);
和拍摄照片
if (mCamera != null) {
try {
mCamera.setPreviewDisplay(mSurfaceHolder);
mCamera.startPreview();
mCamera.takePicture(null, mPictureCallback,
mPictureCallback);
} catch (IOException e) {
e.printStackTrace();
}
}
在此先感谢。请给我建议。任何帮助将AP preciated。
Thanks in advance. Please give me suggestions. any help will be appreciated.
推荐答案
我发现下面的这个解决方案,这为我工作
I have found following solution for this, And that worked for me
使用等待一段时间之前,即500毫秒捕获映像
Wait for some time i.e. 500 ms before capture image using
mCamera.takePicture(null, mPictureCallback,mPictureCallback);
这篇关于前置摄像头采取的android很暗捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文