什么格式是用于具有原始pictureCallback的Android相机?

前端之家收集整理的这篇文章主要介绍了什么格式是用于具有原始pictureCallback的Android相机?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试使用 @L_502_0@图片中的数据.我不喜欢JPEG格式,因为我最终将使用灰度数据. YUV格式与我很好,因为上半部分是灰度级的.

从Android开发教程,

public final void takePicture (Camera.ShutterCallback shutter,
Camera.PictureCallback raw,Camera.PictureCallback postview,
Camera.PictureCallback jpeg)

Added in API level 5

Triggers an asynchronous image capture. The camera service will
initiate a series of callbacks to the application as the image capture
progresses. The shutter callback occurs after the image is captured.
This can be used to trigger a sound to let the user know that image
has been captured. The raw callback occurs when the raw image data is
available (NOTE: the data will be null if there is no raw image
callback buffer available or the raw image callback buffer is not
large enough to hold the raw image). The postview callback occurs when
a scaled,fully processed postview image is available (NOTE: not all
hardware supports this). The jpeg callback occurs when the compressed
image is available. If the application does not need a particular
callback,a null can be passed instead of a callback method.

它谈论“原始图像数据”.但是,无法找到原始图像数据的格式的信息?
你有什么想法吗?

我想要获取照片拍摄的照片的灰度数据,数据位于手机内存中,因此从图像文件写入/读取或在不同的图像格式之间进行转换不会花费时间.或者也许我必须牺牲一些才能得到它?

解决方法

经过一番搜索,我觉得我找到了答案:
Android tutorial

“The raw callback occurs when the raw image data is available (NOTE:
the data will be null if there is no raw image callback buffer
available or the raw image callback buffer is not large enough to hold
the raw image).”

查看此链接(2011/05/10)
Android: Raw image callback supported devices
并非所有设备都支持raw pictureCallback.

https://groups.google.com/forum/?fromgroups=#!topic/android-developers/ZRkeoCD2uyc(2009)
Google员工Dave Sparks表示:

“The original intent was to return an uncompressed RGB565 frame,but
this proved to be impractical. ” “I am inclined to deprecate that API
entirely and replace it with hooks for native signal processing. “

许多人报告类似的问题.看到:
http://code.google.com/p/android/issues/detail?id=10910

由于许多图像处理过程都是基于灰度图像的,所以我期待着Android中为每张照片生成的内存中的灰度级原始数据.

猜你在找的Android相关文章