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!
Metering is a device-dependant matter.
Prior to API level 14 there wasn't a standard API for managing metering, I think that some brands chose their own way to manage it (in your case: "auto-exposure" keyword), but not through the standard APIs. This is why you cannot obtain a valid area. The metering area (0, 0, 0, 0, 0) in your parameters.flatten() means that metering areas are not supported (weight=0), i guess that getMaxNumMeteringAreas() returns 0:
By now there are few devices that support metering areas (in my experience 3/20).