Macro focus mode selection logic & zoom optimisation

51 views
Skip to first unread message

Joe Falconer

unread,
Aug 15, 2014, 5:38:06 AM8/15/14
to zx...@googlegroups.com
Hi Sean (or anyone),

I'm just trying to get my head round the logic used in CameraConfigurationUtils and in particular why Macro mode is a last fall through option along with EDOF.

On the devices I have available to me the device is always forced close to the target to frame the barcode risking image clarity - it would appear that Macro should be the first choice (if available) in any focus mode selection algorithm. I suspect experience has suggested otherwise so I'm keen to understand the thinking behind the logic.

Also, there is no attempt to combine zoom adjustment along with standard autofocus as a means of forcing the device away from the target. Any insights as to why (I see there is a setFocus() method but unused in latest release).

thanks

Joe

Sean Owen

unread,
Aug 15, 2014, 7:01:44 AM8/15/14
to zx...@googlegroups.com
So you're saying that macro should be preferred to auto-focus? Hm, interesting idea.

Macro should make it focus as closely as possible. That's good since the barcode is generally close. Auto-focus should be able to focus as closely, but can get it exactly right? But maybe someone will tell me that macro can actually focus more closely than auto? Also, of course, with non-continuous focus, there is time spent adjusting focus before it settles into focus, and that's lost time.

Zoom will not help scan since it is not optical zoom. What it does however is help get the user to hold the barcode farther away, yes. I've found that essential with Google Glass. For Android devices, it's not consistently supported and so the UI kinda has to be designed without zoom in mind, and instead uses the little reticle to get you to hold it back farther.

Joe Falconer

unread,
Aug 15, 2014, 9:42:54 AM8/15/14
to zx...@googlegroups.com

I think devices that have macro capability don't perform well with close up targets if standard auto-focus mode is used (otherwise it wouldn't make sense to have the macro mode). In my experience macro is short distance, auto-focus (the problem is that the API does not define the relationship between macro and standard auto-focus with any clarity). It seems like scanning is a natural "up close" task which is why I'd have thought macro would be first choice.

I'm not making any suggestions for changes - I just found the selection logic a bit odd and thought I might be missing something.

Joe

Sean Owen

unread,
Aug 15, 2014, 6:39:53 PM8/15/14
to zx...@googlegroups.com
I'll try it out to see how it works on, say, the Nexus 5. Yes I suppose it depends on whether you think auto-focus will focus as closely as macro. I had thought it roughly did but have no idea if it's true in practice. I'm slightly afraid of changing behavior at this point since so many people use it on so many devices. If it's useful in some cases maybe it could be an option.

Sean Owen

unread,
Aug 17, 2014, 6:35:47 PM8/17/14
to zx...@googlegroups.com
You can try macro by just disabling auto-focus in settings. It will choose macro or EDOF if available. 
On my Nexus 5, auto-focus can focus to about 2.5". Macro, weirdly, seemed to focus at about 6-8". It could be a device issue.
Reply all
Reply to author
Forward
0 new messages