I want to know the angle of view from the camera, just like in this question but using android.hardware.camera2. How can I reproduce the next code using the new camera2 library.
I search the google a person show possibility which he calculate FOV by Camera2 api
https://photo.stackexchange.com/questions/54054/calculating-the-field-of-view-for-a-nexus-5
and found the equation
http://www.bobatkins.com/photography/technical/field_of_view.html
FOV (rectilinear) = 2 * arctan (frame size/(focal length * 2))
thus, we need to know frame size and focal length
the frame size is size of camera you can find the code on below link
https://stackoverflow.com/a/30403558
also, focal length you can find below link
Manual focus in camera2, android
and i combine the code like this
A function calculateFOV() calculate FOV angle
https://github.com/pchan1401-ICIL/Camera2FOV