autofocus

Chrome Extension - first link is auto-focused in popup

两盒软妹~` 提交于 2019-12-03 10:28:13
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. The easiest (and javascript free!) way is to simply add tabindex="-1" to any element which you don't want to receive automatic focus. link0ff Perhaps auto-focus was intended for a convenience, but often it does a disservice. Since I see no way to stop the root cause, I found some roundabouts. One is

Android: record video with “continuous” auto-focus

喜你入骨 提交于 2019-12-03 07:52:31
问题 I work on video recording; everything works except for requesting continuous focus. This is what I do (tried both in surfaceCreated and surfaceChanged with no success): camera = Camera.open(); camera.setPreviewDisplay(holder); Parameters parameters = camera.getParameters(); then I do either parameters.setFocusMode(Parameters.FOCUS_MODE_CONTINUOUS_VIDEO); or parameters.set("focus-mode", "continuous-video"); both should do the same thing; then I set parameters with camera.setParameters

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

孤人 提交于 2019-12-02 03:50:03
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. (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-external-lens-camera2-api-in-android

Auto focus in ng-repeat in angularjs

青春壹個敷衍的年華 提交于 2019-12-01 14:31:08
问题 I uses ng-repeat to get multiple phone numbers <div ng-repeat="phone in phones"> <input ng-model="phone" type="text" autofocus="autofocus"> </div> <a ng-click="addPhone()">Add Phone</a> In controllers $scope.addPhone = function() { $scope.phones.add(''); } Whenever i add new phone, it automatically autofocus the input. It works great. But when i reload(open from link) the view, it scrolls to last entry. How do i avoid autofocus at first time the view loads. Only i want to autofocus when i add

Swift: Search bar created at Auto Focus

大憨熊 提交于 2019-12-01 13:08:13
I am creating a table view and a search bar by clicking on a button.But I need the search bar to appear at Auto Focus ( where the user enters text immediately with no need to click inside the search bar). How can I do that ? try this @IBOutlet weak var searchBar: UISearchBar! override func viewDidLoad() { super.viewDidLoad() searchBar.becomeFirstResponder() } This should do it. override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) searchController.active = true } ... extension GDSearchTableViewController: UISearchControllerDelegate { func didPresentSearchController

Swift: Search bar created at Auto Focus

孤人 提交于 2019-12-01 09:38:54
问题 I am creating a table view and a search bar by clicking on a button.But I need the search bar to appear at Auto Focus ( where the user enters text immediately with no need to click inside the search bar). How can I do that ? 回答1: try this @IBOutlet weak var searchBar: UISearchBar! override func viewDidLoad() { super.viewDidLoad() searchBar.becomeFirstResponder() } 回答2: This should do it. override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) searchController.active =

camera parameters.setFocusMode is not working

时光总嘲笑我的痴心妄想 提交于 2019-11-30 15:30:58
I am trying to set the camera autofocus ON ... but whenever i set setFocusMode the application crashes.. java.lang.RuntimeException: setParameters failed my code is : Camera.Parameters parameters = camera.getParameters(); parameters.setFlashMode(Parameters.FLASH_MODE_TORCH); Camera.Size size = getBestPreviewSize(width, height, parameters); Camera.Size pictureSize = getSmallestPictureSize(parameters); if (size != null && pictureSize != null) { parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO); parameters.setPreviewSize(size.width, size.height); parameters.setPictureSize

How can I get autofocus to work in a second AVCaptureSession without recreating the sessions?

江枫思渺然 提交于 2019-11-30 10:19:53
Autofocus is not working on the first AVCaptureSession when I create a second AVCaptureSession. The second session to be created is the one where autofocus works and the first created one does not autofocus. I would expect that either session would be able to auto focus when started after the other one is stopped in the same way the auto white balance and auto exposure work for both sessions. If you observe the log window with the sample code below you can see the key-value-observing messages coming through; but never the changing focus message when the top session is running. Sidenote:

Android: Check whether camera supports auto-focus?

北慕城南 提交于 2019-11-30 08:12:22
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 ? List<String> supportedFocusModes = camera.getParameters().getSupportedFocusModes(); boolean hasAutoFocus = supportedFocusModes != null && supportedFocusModes.contains(Camera.Parameters.FOCUS_MODE_AUTO) i'm guessing: Do not use the unknown constant. getPackageManager().hasSystemFeature

How to develop a Face recognition iPhone app? [closed]

放肆的年华 提交于 2019-11-30 05:21:46
I am trying to develop an iPhone for Face recognition/detection. In my app i want to make my iPhone camera should be auto focused and auto capture. How to recognition the face from iPhone app? It is possible to auto focus the face and auto capture in our iPhone app. If it is possible can anyone please help to do this? I just want any suggestion/ideas and tutorials about that. Can you please help me? Thanks in advance. Core Image has a new CIFaceDetector to detect faces in real time; you can start with these examples to take an overview: SquareCam iOS Facial Recognition Easy Face detection with