2

I am using the custom camera application with preview, using the sdk example on nexus s (2.3)

everything works fine, including taking sharp picture, but the preview does not seem to adjust his level (intensity) like the built in camera does: when I preview dark objects, the built in camera compensates and increases the intensity, while the custom preview stays in the default intensity, making the preview pretty dark. The images turns out in the correct intensity. It is not related to white balancing, nor to camera exposure.

I do not want to have a full preview processing chain - just enable the luminance automatic level control - is it possible using the standard API?

Thanks

1 Answers1

0

If you use the autofocus on preview I believe you will get the results you expect.

See Camera.autofocus and Camera.AutoFocusCallback

I believe you'll get one autofocus per call. That is, it's not continuous. You can either implement a way to call it continuously using handlers or simply put a touchlistener on your surfaceview and do autofocus when the user taps the preview.

mmeyer
  • 3,598
  • 1
  • 19
  • 22
  • tried it, but it did not help. Why do you think it is related to autofocus? – user1267111 Mar 13 '12 at 20:32
  • I have seen similar effects to what you describe in some camera work I've done. That being that the white balance and contrast are way off and the preview doesnt adjust. In my case, I'm doing real time face detection, so when I dont find a face I ask for autofocus which I noticed would also auto adjust white bal / contrast. Perhaps you need to call autofocus more than once to resample? – mmeyer Mar 13 '12 at 21:15