autofocus

Android ACTION_IMAGE_CAPTURE auto focus on take picture

怎甘沉沦 提交于 2020-01-06 20:05:24
问题 We were using Camera API for our custom camera application. However, it turned out to be a very hard problem. Many devices required extra testing as they seemed to perform unexpected behaviors. So, we have decided to migrate to Android's camera intent. However, we are dealing with image retrieval tasks so, we don't want our users to send us blurry pictures. Previously, we were using autofocus as user taps on take picture button. Android camera intent performs worse than ours because it does

Finding the distance of object from a logitech camera

℡╲_俬逩灬. 提交于 2020-01-03 05:12:13
问题 I want to find the distance of an object from camera. Note here I am using single camera. Camera autofocuses to focus on planes at particular distance from camera. Is there a way I can find this focus distance? 回答1: I think you are looking for z-direction information even though the image from a camera only gives x-direction and y-direction information. What you have embarked upon is considerably tricky. At your current stage of investigation I would recommend that you go through chapter 4

onfocus is not called when using the autofocus attribute on an input tag

余生颓废 提交于 2019-12-23 09:20:05
问题 In the following example, I get only one alert box. I read that the focus is put before the JavaScript code is executed. Is there a way to get this to work on? <input id="i" type="text" autofocus onfocus="alert(1)"> <script type="text/javascript"> document.getElementById('i').addEventListener('focus', function() { alert(2); }, false); </script> (I have only tested this in Safari) Edit: I can obviously do it this way (Prototypejs selector): var autofocusElement = $$('input[autofocus]')[0];

Implement indicator on tap to focus in camera [android]

醉酒当歌 提交于 2019-12-23 01:35:15
问题 I have my own camera android app which performs pinch zoom and tap to focus. In tap to focus i need to draw a rectangle or circle indicator when i touch the screen and redraw wherever i touched.One more thing i want to change the color if auto focus has done. So far i have done to draw rectangle on screen at center but i couldn't redraw it if i touched somewhere on the screen. Any idea or suggestion to implement it would be thankful My codes are @Override public void onDraw(Canvas canvas) {

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

一曲冷凌霜 提交于 2019-12-21 19:20:12
问题 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

takePicture failed after autofocus for the second time

不羁的心 提交于 2019-12-21 18:17:08
问题 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

iPhone camera loses auto-focus when using ZBarSDK

故事扮演 提交于 2019-12-21 04:58:17
问题 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

Autofocus on input field when div slides down

牧云@^-^@ 提交于 2019-12-21 03:36:09
问题 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. 回答1: You can use slideDown 's callback function which is executed when animation is

Chrome Extension - first link is auto-focused in popup

南笙酒味 提交于 2019-12-21 03:31:06
问题 How do I stop my Google Chrome extension's default action to auto-focus the first link in my popup.html ? I know I could probably do some roundabout hack with JS or change the :focus CSS, but I think this is throwing off something else I'm trying to do and I'd prefer to stop the root cause of it. 回答1: The easiest (and javascript free!) way is to simply add tabindex="-1" to any element which you don't want to receive automatic focus. 回答2: Perhaps auto-focus was intended for a convenience, but

Searching focus keeps failing with external lens, camera2 api in android

烈酒焚心 提交于 2019-12-20 04:38:30
问题 I am using camera2 api for my custom camera. I implemented touch to focus. It is working fine. But when I'm trying to attach external lens, it can't find focus distance, I have to try several times. Native camera works perfectly even with the lens. What else should I consider? Any opinions? please guide. 回答1: (For the further usage) I ended up the solution using samsung camera sdk. It is working perfectly 来源: https://stackoverflow.com/questions/42090124/searching-focus-keeps-failing-with