Pergunta

In my application, I have a SurfaceView showing a Camera preview, and want to use the stereoscopic camera on my phone to take 3D pictures (for the curious, the app has a novelty viewfinder). The Camera application that came on the phone saves them in .mpo format if you switch to 3D mode.

The available ImageFormat values for Camera don't include mpo. By default, it seems a newly instantiated Camera is set to return jpg data. Setting parameters.setPictureFormat(ImageFormat.UNKNOWN); caused an IllegalArgumentException.

Does anyone know how to get the onPictureTaken() callback to receive mpo data?

Foi útil?

Solução

Turns out: stock Android doesn't provide for stereoscopic cameras, at least in the ICS release out at the time of writing. What you need are the OEM sdks to take advantage of device-specific libraries to get the appropriate callbacks.

The HTC Evo has stuff here: http://htcdev.com/devcenter/opensense-sdk

And the Sharp Aquos phone has stuff here: https://sh-dev.sharp.co.jp/android/modules/sdk/index.php?/sdk

I wish there were some cross-device methods to use. :( It's going to be laborious implementing code for each of the 3D devices out there, though there aren't many yet.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top