How to set camera resolution in Android with OpenCV?

前端 未结 3 830
被撕碎了的回忆
被撕碎了的回忆 2020-12-28 20:51

I\'m trying to develop an app for Android, and I would need to get uncompressed pictures with a resolution as high as possible from the camera. I tried takePicture\'s rawCal

3条回答
  •  误落风尘
    2020-12-28 21:41

    You have to get supported camera preview resoultions by calling getSupportedPreviewSizes.

    After this you can set any resolution with method setPreviewSize. And don't forget to setParameters in the end. Actally many OpenCV Android examples contain this information (look at sample3).

提交回复
热议问题