I can obtain focal length using the camera parameters in Android like this:
Camera.Parameters parameters = camera.getParameters();
Log.d(TAG, "Focal length:"+parameters.getFocalLength());
It gives me 3.97 (correct). Since I use OpenCV for my project, I want to use the variable already provided, which is:
Log.d(TAG, "Focal length:"+Highgui.CV_CAP_PROP_ANDROID_FOCAL_LENGTH);
But it gives me a result of 8005. I'm new to OpenCV, so if anyone could give me a hint, I would really appreciate it.
The one you use from Highgui is Constant. It is the same whatever the camera is. I think you to stick to the android camera parameter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With