Log in or register to post comments

FOCUS_MODE_INFINITY not working anymore?

February 29, 2012 - 1:25pm #1

Before upgrading from the 1.5 beta to Vuforia 1.5.9, I'd set focus mode to infinity to turn off auto focus. Now it won't let me (iPhone 4S). I can set it to normal successfully. Is there any other way for me to set it to never auto focus?

edit:

On iPhone 4S
FOCUS_MODE_NORMAL - works
FOCUS_MODE_TRIGGERAUTO - didn't try
FOCUS_MODE_CONTINUOUSAUTO - works
FOCUS_MODE_INFINITY - doesn't work
FOCUS_MODE_MACRO - doesn't work

Gives me "Requested Focus mode FOCUS_MODE_INFINITY. Not supported on this device." in Xcode. I tested FOCUS_MODE_INFINITY on 3GS and got same error.

Re: FOCUS_MODE_INFINITY not working anymore?

March 12, 2012 - 2:04pm #11

I think that NORMAL is the locked state.

Re: FOCUS_MODE_INFINITY not working anymore?

March 12, 2012 - 1:16pm #10

If we trigger a focus it seems to stick with that from then on, which works for us. I checked back and in the 1.5 beta, all focus modes seem to do the same thing, which is trigger an auto focus (and all of them report 'requested focus mode successfully').

Re: FOCUS_MODE_INFINITY not working anymore?

March 12, 2012 - 10:56am #9
DavidBeard wrote:

I've been able to confirm that the iOS capture API only allows continuous autofocus, single shot autofocus, and a 'normal' focus. There apparently are no infinite or macro options.

https://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Focus_Modes

Quote:

AVCaptureFocusModeLocked
The focus is locked.
Available in iOS 4.0 and later.
Declared in AVCaptureDevice.h.

:confused:

edit: ok I'm doing more tests with clean projects (one using 1.5 beta and another using latest vuforia release) -- will report results.

Re: FOCUS_MODE_INFINITY not working anymore?

March 9, 2012 - 6:18pm #8

I've been able to confirm that the iOS capture API only allows continuous autofocus, single shot autofocus, and a 'normal' focus. There apparently are no infinite or macro options.

Re: FOCUS_MODE_INFINITY not working anymore?

March 5, 2012 - 10:45am #7
ksiva wrote:

We're looking into this. In the meanwhile, setting the focus mode to FOCUS_MODE_NORMAL should disable continuous autofocus. Does that not suit your needs?

- Kim

It will still occasionally tigger a refocus when set to FOCUS_MODE_NORMAL. It is really distracting when your view goes blurry for a couple seconds.

Re: FOCUS_MODE_INFINITY not working anymore?

March 1, 2012 - 4:27pm #6

We're looking into this. In the meanwhile, setting the focus mode to FOCUS_MODE_NORMAL should disable continuous autofocus. Does that not suit your needs?

- Kim

Re: FOCUS_MODE_INFINITY not working anymore?

March 1, 2012 - 9:47am #5
DavidBeard wrote:

You were using FOCUS_MODE_INFINITY?

Let me check with one of our iOS gurus, and I'll confirm what the status of the camera modes is for the 4S.

Yes, I was definitely using FOCUS_MODE_INFINITY in the 1.5 beta. It's really distracting when the camera refocuses so that was one of the first things I changed when I first implemented QCAR.

Re: FOCUS_MODE_INFINITY not working anymore?

February 29, 2012 - 6:02pm #4

You were using FOCUS_MODE_INFINITY?

Let me check with one of our iOS gurus, and I'll confirm what the status of the camera modes is for the 4S.

Re: FOCUS_MODE_INFINITY not working anymore?

February 29, 2012 - 5:55pm #3
DavidBeard wrote:

Apparently the 4S doesn't support all of the focus modes. I think that NORMAL and autofocus are your options.

You can review the focus modes available on your phone by attaching the CameraDeviceMenu.cs script found in the ImageTarget sample to an ARCamera instance. This will query your available modes and generate a menu of them them as a GUI.

I was using it just fine in the 1.5 beta though :confused:

Re: FOCUS_MODE_INFINITY not working anymore?

February 29, 2012 - 4:21pm #2

Apparently the 4S doesn't support all of the focus modes. I think that NORMAL and autofocus are your options.

You can review the focus modes available on your phone by attaching the CameraDeviceMenu.cs script found in the ImageTarget sample to an ARCamera instance. This will query your available modes and generate a menu of them them as a GUI.

Log in or register to post comments