Get the focal length of an OpenCV Android camera

I can get the focal length using the camera settings in Android, for example:

Camera.Parameters parameters = camera.getParameters();
Log.d(TAG, "Focal length:"+parameters.getFocalLength());

This gives me 3.97 (correct). Since I use OpenCV for my project, I want to use an already provided variable, which:

Log.d(TAG, "Focal length:"+Highgui.CV_CAP_PROP_ANDROID_FOCAL_LENGTH);

But that gives me a result of 8005. I am new to OpenCV, so if anyone can give me a hint, I would really appreciate it.

+5
source share
1 answer

The one you use from Highgui is a constant. This is the same as the camera. I think you should stick with the Android camera setting

+1
source

All Articles