pinguo-yuyidong / camera2 Goto Github PK
View Code? Open in Web Editor NEWAndroid L Camera2 Demo
Android L Camera2 Demo
看到下列日志:
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value manual
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value manual-cct
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value emboss
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value sketch
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value neon
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value asd
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value backlight
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value flowers
01-22 13:42:39.799: W/ArrayUtils(31573): Ignoring invalid value AR
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value manual-cct
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value emboss
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value sketch
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value neon
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value asd
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value backlight
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value flowers
01-22 13:42:39.829: W/ArrayUtils(31573): Ignoring invalid value AR
01-22 13:42:40.034: W/TextureView(31573): A TextureView or a subclass can only be used with hardware acceleration enabled.
运行环境:CM12,SDK:5.0.2
也没有报错,就直接闪退了,找不到问题=。=
Hello pinguo-yuyidong,
I have to implement your library but auto flash not working in some of the devices and also implement custom turn on and off flash both are not working.
Thanks in advance
我在S5和qiku手机上测试,发现手动对焦时App会崩溃,这是因为手机本身不支持手动控制焦距吗?
我试图将曝光时间设置得很大,但是拍照效果没变化。在设置SENSOR_EXPOSURE_TIME同时,我添加了一些内容,但是仍旧没有效果
mPreviewBuilder.set(CaptureRequest.CONTROL_MODE,CameraMetadata.CONTROL_MODE_OFF);
mPreviewBuilder.set(CaptureRequest.CONTROL_AE_MODE,CameraMetadata.CONTROL_AE_MODE_OFF);
如题
你好 我想請問一下
我下載下來之後怎麼不能執行,出現兩個專案一個MyActivity, MainActivity
我是使用ECLIPSE 來做執行的,顯示紅色 錯誤 無法執行
還有想問一下 app跟camera2是差別在哪邊
我想看如何寫出 ISO ,EXPOSURE 這兩個如何撰寫與流程 不知道在哪邊
java.lang.IllegalArgumentException: createDefaultRequest - invalid templateId specified
Whenever i try taking an image on MOTO X Play , by changing the flash mode the app crashes.
Following is the crash Log:
FATAL EXCEPTION: main
Process: us.yydcdut.androidltest, PID: 7764
java.lang.IllegalArgumentException: Bad argument passed to camera service
at android.hardware.camera2.utils.CameraBinderDecorator.throwOnError(CameraBinderDecorator.java:114)
at android.hardware.camera2.utils.CameraBinderDecorator$CameraBinderDecoratorListener.onAfterInvocation(CameraBinderDecorator.java:73)
at android.hardware.camera2.utils.Decorator.invoke(Decorator.java:81)
at java.lang.reflect.Proxy.invoke(Proxy.java:393)
at $Proxy1.createDefaultRequest(Unknown Source)
at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureRequest(CameraDeviceImpl.java:628)
at us.yydcdut.androidltest.ui.DisplayFragment.takePicture(DisplayFragment.java:563)
at us.yydcdut.androidltest.ui.DisplayFragment.access$400(DisplayFragment.java:85)
at us.yydcdut.androidltest.ui.DisplayFragment$2.onTouch(DisplayFragment.java:438)
at android.view.View.dispatchTouchEvent(View.java:9299)
Hello,
In https://github.com/pinguo-yuyidong/Camera2/blob/master/app/src/main/java/us/yydcdut/androidltest/otheractivity/FlashActivity.java : you open camera twice, you need to remove the line mCameraManager.openCamera("0", new MyCameraDeviceStateCallback(), null); after the whole if else
@SuppressWarnings("ResourceType") private void init() throws CameraAccessException { mCameraManager = (CameraManager) FlashActivity.this.getSystemService(Context.CAMERA_SERVICE); //here to judge if flash is available CameraCharacteristics cameraCharacteristics = mCameraManager.getCameraCharacteristics("0"); boolean flashAvailable = cameraCharacteristics.get(CameraCharacteristics.FLASH_INFO_AVAILABLE); if (flashAvailable) { mCameraManager.openCamera("0", new MyCameraDeviceStateCallback(), null); } else { Toast.makeText(FlashActivity.this, "Flash not available", Toast.LENGTH_SHORT).show(); //todo: throw Exception } mCameraManager.openCamera("0", new MyCameraDeviceStateCallback(), null); }
使用Camera2,想添加一些exif信息到拍照后的图片上
After I took the first picture,the texture rotated 90 degrees. What can I do to deal with it? What could be the issue?
I want to have similar "tap to focus" as it is their default camera app. I can see the code written for it but it doesn't behave like that one, infact it doesn't even focus on that point.
点击拍照按钮没反应,存在很多问题。界面上只显示了两个按钮,一个设置一个拍照。其他的不没有
I added these codes as follow: if(!manualSupport){
mCaptureBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);
}
else{mCaptureBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_ZERO_SHUTTER_LAG);}
Due to lacking of the zero shut function.But after I took the first picture,the texture rotated 90 degrees.What can I do to deal with it.What's more ,could you tell why does it occur?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.