Hi guys,
I'm still struggling a bit to get the best focus
possible for this kind of devices, specially when it comes to performing
manual focus, I've observed that in normal conditions the CameraX AF
routine does a fairly good job at focusing in the ID(see picture in the
first message), however AF struggles when there's a change in the
distance of the target object and fails to re-focus automatically unless
I issue a manual `FocusMeteringAction`, when I do that, I get worse
results than the ones I would get with AF, that is, the soft edges are
way more noticeable.
I am wondering, what is
the best way of issuing a manual `FocusMeteringAction` to focus on an ID
such as the one attached to this thread?, this is what I'm doing right
now.
1. Get the x and y coordinates from the center of the SurfaceView, since I assume that the object is centered as well.
2.
I use a `SurfaceOrientedMeteringPointFactory` to build the
MeteringPoint, I use the default size but have tried changing it to
different values with the same results.
3. Then I use the focus point like this:
val meteringAction =
FocusMeteringAction.Builder(meteringPoint, FocusMeteringAction.FLAG_AF)
.setAutoCancelDuration(AF_AUTO_CANCEL_TIME_MS, TimeUnit.MILLISECONDS)
.build()
val focusMeteringFuture = cameraControl.startFocusAndMetering(meteringAction)
I
am using CameraX 1.3.0 and a Pixel 6 for testing and I'd at least want
my manual focus to be as good as the auto focus results, I've tried
adding multiple focus points to the builder but I'm still getting the
same results.
Thanks in advance