I'm trying to implement Spot Metering using an android phone. parameters.set("auto-exposure", "spot-metering");
However, I'm a bit confused as to how the metering works. If I understand correctly, Spot Metering works by selecting a region that it uses to set exposure values.
However, when flattening the Camera.Parameters class and displaying the results, metering area was (0, 0, 0, 0, 0) [meaning it has zero width, height, and weight] while the auto-exposure setting was correctly "spot-metering". In the API, however, "getMeteringAreas()" documentation says that the metering area CANNOT have zero width and height.
So how can I be using "spot-metering" while metering-area is size 0? I tried setting the metering-area to the upper right hand corner but it didn't have any effect on exposure.
This leads me to believe that auto-exposure=spot-metering doesn't have anything to do with the metering areas....which is strange.
If that's not the case, can someone please help me understand what I'm doing wrong? If you need more information, I'll be happy to include code.
If that is the case (as in, metering areas has nothing to do with spot metering), can someone help me figure out how to CHOOSE the spot that auto-exposure meters from? I think it defaults to the center.
Thanks!
MeteringAreas
parameter is for auto-focus metering.There is no Android api for the exposure metering modes. You need to find proper undocumented parameter name and values to set it (for example, by dumping all parameters via
native_getParameters
).For example, for the Samsung Galaxy Note 3 parameter name is
metering
and accepted values arecenter
,matrix
andspot
. So you just callset("metering", "spot");
and it magically works.