autofocus

Android camera2 API get focus distance in AF mode

房东的猫 提交于 2019-12-06 21:21:40
问题 I'm working with Android camera2 API. I can get focus distance value using LENS_FOCUS_DISTANCE in manual focus mode. However, the property is always zero in AF mode. Is there any way to get focus distance in AF mode? 回答1: Shortest distance from frontmost surface of the lens that can be brought into sharp focus. If the lens is fixed-focus, this will be 0. http://developer.android.com/intl/es/reference/android/hardware/camera2/CameraCharacteristics.html In other way, if you want to manage focus

How to avoid automatic focus on first input field when popping a HTML form as a JQuery dialog?

怎甘沉沦 提交于 2019-12-05 12:24:20
问题 I have seen similar questions on SO, including this one, which is old. I read and followed links, but it is unclear whether there is a proper solution to this issue today. My bottom issue is that I am using HTML's placeholder="..." on the input fields. By focusing automatically on the first field, its placeholder is not visible to the user anymore. EDIT Here is my HTML code: <div id='LOGIN_FORM' title="Login"> <form action=""> <input type="text" name="login_id" required="required" placeholder

SetFocus does not work on iPad

≯℡__Kan透↙ 提交于 2019-12-05 02:59:37
问题 We found that this code works on a PC with: IE, Safari and FireFox. However on an iPad or iPhone with Safari it does not auto focus on a textbox. We cannot touch the screen and click the textbox, we need the auto focus. Any tips here? thanks! <script language='JavaScript'> <!-- function SetFocus() { document.form1['txtCode'].focus(); } window.onload = SetFocus; // --> </script> 回答1: Unfortunately, it appears Mobile Safari does not support this behaviour, by design. http://www.quora.com/Mobile

Android camera2 API get focus distance in AF mode

独自空忆成欢 提交于 2019-12-05 02:24:42
I'm working with Android camera2 API. I can get focus distance value using LENS_FOCUS_DISTANCE in manual focus mode. However, the property is always zero in AF mode. Is there any way to get focus distance in AF mode? Francisco Durdin Garcia Shortest distance from frontmost surface of the lens that can be brought into sharp focus. If the lens is fixed-focus, this will be 0. http://developer.android.com/intl/es/reference/android/hardware/camera2/CameraCharacteristics.html In other way, if you want to manage focus, remember that LENS_INFO_MINIMUM_FOCUS_DISTANCE give you the minimum focus, but to

Android Camera.autoFocus and FOCUS_MODE_CONTINUOUS_PICTURE

断了今生、忘了曾经 提交于 2019-12-04 22:18:07
问题 I have a camera app that allows the user to take pictures. On my main screen I have a camera rendered on a SurfaceView. When the user takes a photo, I call camera.autoFocus and on the AutoFocusCallback callback I call camera.takePicture. Then I save the photo and go to another activity to preview the photo. I call camera.stopPreview() when leaving the camera page (onPause), and camera.startPreview() when coming back (onResume). The camera is initialized using FOCUS_MODE_CONTINUOUS_PICTURE. I

How to disable/modify AutoFocus and AutoWhiteBalance on Android Camera using OpenCV

余生颓废 提交于 2019-12-04 10:20:18
I'm using Android + Opencv(new to opencv) and I'm currently working with real time object detection (the object stays really close to the android device Camera) , and I noticed that the Android camera's autoFocus keeps modifying my frames (kind of 'zoom in' and 'zoom out' effect) which make it harder for me to keep tracking the object. I need to turn the "AUTO FOCUS" off because in my case the more blurred image input I have, the better, and I also need to turn the AutoWhiteBalance off as well, or maybe set to a different value. I would like to know how to do it through my OpenCV

takePicture failed after autofocus for the second time

扶醉桌前 提交于 2019-12-04 09:23:30
I am developing an android camera app, using autofocus. The issue, i am able to capture for the first time, but when i am trying to capture for the second time the below exception occurs. 4-19 11:28:32.509: E/AndroidRuntime(4409): FATAL EXCEPTION: main 04-19 11:28:32.509: E/AndroidRuntime(4409): java.lang.RuntimeException: takePicture failed 04-19 11:28:32.509: E/AndroidRuntime(4409): at android.hardware.Camera.native_takePicture(Native Method) 04-19 11:28:32.509: E/AndroidRuntime(4409): at android.hardware.Camera.takePicture(Camera.java:878) 04-19 11:28:32.509: E/AndroidRuntime(4409): at

Android: Check whether camera supports auto-focus?

为君一笑 提交于 2019-12-03 19:24:57
问题 For the Android API version 2.1 and higher, we can use context: getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS) But before version 2.1, how can we perform the same operation? Is there anything like this that does not involve invoking Camera.open and then getParameters ? 回答1: List<String> supportedFocusModes = camera.getParameters().getSupportedFocusModes(); boolean hasAutoFocus = supportedFocusModes != null && supportedFocusModes.contains(Camera.Parameters.FOCUS

iPhone camera loses auto-focus when using ZBarSDK

谁说胖子不能爱 提交于 2019-12-03 15:14:56
I'm working on an app that the user can select if he wants to scan a barcode or take a picture of something. For taking a picture I'm using the UIImagePickerController as usual. For scanning barcode I'm using the ZbarSDK 1.2 ZBarReaderViewController . When taking a picture everything works perfect. When scanning a barcode: If you start the app and scan a barcode before taking a picture, it's also works perfect. But is you take a picture, and then go back and try to scan a barcode, the camera loses the auto-focus and it's just impossible to scan a barcode. To summarize: Start -> Scan -> Auto

Autofocus on input field when div slides down

穿精又带淫゛_ 提交于 2019-12-03 10:52:59
I have is a hidden div. When the button is clicked, the div slides down with an input field. How do I make this input field autofocus as soon as the div slides down? Thanks. <input type="text" name="comment_field" id="comment_field" placeholder="Comment..." /> is what I have and is in a div $("#status_comments_"+a).slideDown(); $("#comment_field").focus(); I tried to use the above, but that didn't work. You can use slideDown 's callback function which is executed when animation is complete. $("#status_comments_"+a).slideDown(function(){ $("#comment_field").focus(); }); Note that IDs must be