开发者

Android: Impossible to obtain RAW image data from camera?

开发者 https://www.devze.com 2023-01-31 17:33 出处:网络
Currently planning on doing a photography app utilizing RAW data provided by the camera in Android devices.

Currently planning on doing a photography app utilizing RAW data provided by the camera in Android devices.

I wrote a quick skeleton using the camera API and noticed that in the callback with the RAW image data, the data buffer given is always NULL, regardless of how large or small I make the image, but I'm able to access the JPG buffer.

I did some searching and found this thread: http://markmail.org/message/sraudbyrsi2hjqfr#query:I%27m%20talking%20about%20deprecating%20the%20raw%20picture%20callback%20that%20has%20never+page:1+mid:sraudbyrsi2hjqfr+state:results

Which mentions that at the time of that writing (February 2009), it "had never worked". So, am I right to assume that today it still doesn't work, or am I perhaps setting something up incorrectly?

The phone I'm using to debug with is a Droid X.

Just confused because I do see that the API mentions that the RAW data buffer in the callback can be null if there isn't enough memory available on the device, but it's being returned as null even when I set the image to extremely small sizes(100x100)

Thanks

Edit:

Adding some debug output which I get from LogCat:

DEBUG/CameraHal(1156): Initializing capture memory raw: 0x42d39000 (155648), jpg: 0x429c4000 (57856), pv 0x42d5f000 (276736)

DEBUG/CameraHal(1156): Received raw yuv 0x4119f000 size 153600

DEBUG/CameraHal(1156): Received jpg 0x429c4000 size 57584

DEBUG/CamTest(4716): RAW callback- data is NULL

DEBUG/CamTest(4716): JPEG callback- data is valid

&qu开发者_如何学Goot;CamTest" is my custom debug output.


It looks like it indeed has never worked. From your other thread it looks like it never will either.


Work only on Nexus 5 (maybe 7 ) using Android L.

Try this app: https://github.com/dylian94/android-Camera2Basic

It use the new camera API of Google: http://connect.dpreview.com/post/2707133307/google-android-api-camera-raw

0

精彩评论

暂无评论...
验证码 换一张
取 消