如何使用camera2.cameraCharacteristics获取摄像机的mp

时间:2019-05-29 10:15:55

标签: java android

如何使用camera2.CameraCharacteristics获取摄像机的mp?我正在尝试以下方式

CameraCharacteristics characteristics = cameraManager.getCameraCharacteristics(cameraId);

Size[] sizes =  characteristics.get(CameraCharacteristics.JPEG_AVAILABLE_THUMBNAIL_SIZES);
for (int i = 0; i < sizes.length; i++) {
    Size size = sizes[i];
    map.putString("size_"+i, size.toString());
    double mp = Math.ceil((size.getWidth() * size.getHeight() )/ (1000 * 1000));                           
}

0 个答案:

没有答案