Share via


Camera.Parameters.MeteringAreas Property

Definition

Caution

deprecated

Gets the current metering areas. -or- Sets metering areas.

[System.Obsolete("deprecated")]
public virtual System.Collections.Generic.IList<Android.Hardware.Camera.Area>? MeteringAreas { [Android.Runtime.Register("getMeteringAreas", "()Ljava/util/List;", "GetGetMeteringAreasHandler")] get; [Android.Runtime.Register("setMeteringAreas", "(Ljava/util/List;)V", "GetSetMeteringAreas_Ljava_util_List_Handler")] set; }
[<System.Obsolete("deprecated")>]
[<get: Android.Runtime.Register("getMeteringAreas", "()Ljava/util/List;", "GetGetMeteringAreasHandler")>]
[<set: Android.Runtime.Register("setMeteringAreas", "(Ljava/util/List;)V", "GetSetMeteringAreas_Ljava_util_List_Handler")>]
member this.MeteringAreas : System.Collections.Generic.IList<Android.Hardware.Camera.Area> with get, set

Property Value

a list of current metering areas

Attributes

Remarks

Property getter documentation:

Gets the current metering areas. Camera driver uses these areas to decide exposure.

Before using this API or #setMeteringAreas(List), apps should call #getMaxNumMeteringAreas() to know the maximum number of metering areas first. If the value is 0, metering area is not supported.

Each metering area is a rectangle with specified weight. The direction is relative to the sensor orientation, that is, what the sensor sees. The direction is not affected by the rotation or mirroring of #setDisplayOrientation(int). Coordinates of the rectangle range from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000) is the lower right point. The width and height of metering areas cannot be 0 or negative.

The weight must range from 1 to 1000, and represents a weight for every pixel in the area. This means that a large metering area with the same weight as a smaller area will have more effect in the metering result. Metering areas can partially overlap and the driver will add the weights in the overlap region.

A special case of a null metering area list means the driver is free to meter as it chooses. For example, the driver may use more signals to select metering areas and change them dynamically. Apps can set the metering area list to null if they want the driver to completely control metering.

Metering areas are relative to the current field of view (#getZoom()). No matter what the zoom level is, (-1000,-1000) represents the top of the currently visible camera frame. The metering area cannot be set to be outside the current field of view, even when using zoom.

No matter what metering areas are, the final exposure are compensated by #setExposureCompensation(int).

Java documentation for android.hardware.Camera.Parameters.getMeteringAreas().

Property setter documentation:

Sets metering areas. See #getMeteringAreas() for documentation.

Java documentation for android.hardware.Camera.Parameters.setMeteringAreas(java.util.List<android.hardware.Camera.Area>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to