Reputation: 4296
In the old camera api I had the Camera.Parameters's setFocusArea that I could specify a rect to the camera focus, but in the new Camera2 api I can specify only the focus distance. Anyone knows how to specify a rect to the camera focus?
The desired effect is to implement focus on touch. I found a lot of answers here in Stack Overflow to implement focus on touch in new camera api, but no one lets me specify a Rect.
Upvotes: 1
Views: 1096
Reputation: 18107
You can set the autofocus metering region in the CaptureRequest with the CONTROL_AF_REGIONS key. There are corresponding keys for the auto-exposure and auto-white balance regions as well.
Upvotes: 5