HERE Android SDK Developer's Guide

CameraParams

The class CameraParams is a member of com.here.android.mpa.ar.ARController.

Class Summary

public static final class ARController.CameraParams

extends java.lang.Object

Encapsulates parameters which affect the device camera.

[For complete information, see the section Class Details]

Method Summary

Table 1. Methods in CameraParams
Methods

public int getFps ()

Get camera FPS.

public float getHorizontalFov ()

Get horizontal field of view of Camera view in the CompositeFragment.

public Size[] getPreviewSizes ()

Get the array of supported camera resolutions for Camera view.

public Size getSize ()

Get camera resolution for Camera view.

public float getVerticalFov ()

Get vertical field of view of Camera view in the CompositeFragment.

public CameraParams setFps (int fps)

Set camera FPS.

public CameraParams setSize (Size size)

Set camera resolution for Camera view.

Class Details

Encapsulates parameters which affect the device camera. The device camera is used when in CAMERA view.

Method Details

public int getFps ()

Get camera FPS.

Returns:

Camera FPS. If not available -1.

public float getHorizontalFov ()

Get horizontal field of view of Camera view in the CompositeFragment. This is not camera hardware filed of view. IMPORTANT! View has to exist in the CompositeFragment in order to retrieve the value, otherwise invalid value is returned.

Returns:

horizontal field of view, in degrees

public Size[] getPreviewSizes ()

Get the array of supported camera resolutions for Camera view.

Returns:

The array of supported camera resolutions. null if camera not found. See Size

public Size getSize ()

Get camera resolution for Camera view.

Returns:

size Camera resolution. See Size

public float getVerticalFov ()

Get vertical field of view of Camera view in the CompositeFragment. This is not camera hardware filed of view. IMPORTANT! View has to exist in the CompositeFragment in order to retrieve the value, otherwise invalid value is returned.

Returns:

vertical field of view, in degrees

public CameraParams setFps (int fps)

Set camera FPS. This call should be made prior to creating CompositeFragment object.

Parameters:

  • fps

    Camera FPS.

public CameraParams setSize (Size size)

Set camera resolution for Camera view. Currently, any size equal to or greater than 640X480 is supported. This call should be made prior to creating CompositeFragment object.

When a custom size is set, it will be matched to the closest supported size for a given device, as reported by getPreviewSizes().

Setting the camera size to high resolutions has a significant performance impact.

Parameters:

  • size

    Camera resolution. See Size