简体   繁体   English

使用camera.takePicture(快门回调,jpeg回调)和setOneShotPreviewCallback捕获的图像是否有质量差异?

[英]Is there any quality difference in image captured using camera.takePicture(shutter callback, jpeg callback) and setOneShotPreviewCallback

I'm an intermediate android programmer. 我是一名中级android程序员。 I've a simple application created for learning camera. 我创建了一个用于学习相机的简单应用程序。 My app is using camera.takePicture() method to register callbacks for JPEG callback and eventually capture the picture. 我的应用程序使用camera.takePicture()方法注册JPEG回调的回调并最终捕获图片。 But I feel that it may also be possible to capture the image using setOneShotPreviewCallback() and providing a callback. 但我觉得也可以使用setOneShotPreviewCallback()并提供回调来捕获图像。

My question is: 我的问题是:

  • Will there be any differences in image quality between the 2 approaches? 两种方法之间的图像质量是否会有差异?
  • Any additional things to be taken care of when trying to construct image using setOneShotPreviewCallback() ? 尝试使用setOneShotPreviewCallback()构造图像时要注意的任何其他事项?

Thanks in advance. 提前致谢。

takePicture() uses (potentially) the camera's full resolution. takePicture()使用(可能)使用相机的完整分辨率。 The preview gives you the image shown on screen which is more usually the screen's resolution. 预览为您提供了屏幕上显示的图像,通常是屏幕的分辨率。 The picture will be higher resolution in general and higher quality. 图片将具有更高的分辨率和更高的质量。 Note that you get something like JPEG-encoded data from the picture callback, but raw image buffer data in the preview callback. 需要注意的是你喜欢的东西在预览回调从图片回调JPEG编码的数据,但原始图像缓冲区中的数据。

该人正在使用表面视图通过摄像头捕获图像,其质量会很好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM