01-10-2014 08:46 AM
How to get the camera view angles (horizontal and vertical) ?
Solved! Go to Solution.
01-10-2014 08:50 AM
01-10-2014 08:54 AM
01-10-2014 09:15 AM
01-10-2014 09:17 AM
AFAIK this is not available, you could do it manually but this is probably not what you want to do and you probably don't have all the devices.
I would recommend putting a JIRA report in and also trying to contact BlackBerry.
01-10-2014 09:20 AM - edited 01-10-2014 09:21 AM
I understood even on Android this was not a reliable function with some values being hardcoded and/or random on some devices.
something like this http://doc.qt.digia.com/qt-quick3d-snapshot/qml-ca
also i have ported an android app before to blackberry .. and i was using these lines of code to get these parameters:
camHorAngle = mCamera.getParameters().getHorizontalViewAngle();
camVerAngle = mCamera.getParameters().getVerticalViewAngle();
Ideally you would think everything accessible to Android would also be in the Native APIs but sadly that is not the case.
Put a request in to JIRA.
01-10-2014 09:51 AM
The horizontal and vertical FOV properties are available with the camera_get_physical_property() function.
That's using the C Camera API. I don't believe you can access it using the Cascades Camera control.
01-12-2014 10:52 PM - edited 01-12-2014 10:55 PM
i wrote the following code to use this function:
camera_open(CAMERA_UNIT_REAR, CAMERA_MODE_PREAD , &hCamera);
camera_get_physical_property(hCamera, CAMERA_PHYSPROP_HORIZONTALFOV, &horizFov, CAMERA_PHYSPROP_VERTICALFOV, &verticalFov);
but got the following errors:
make: *** [Device-Debug] Error 2
make: *** [debug] Error 2
i have included the camera/camera_api.h file
01-13-2014 10:27 AM