Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Impossible to obtain RAW image data from camera?

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

"CamTest" is my custom debug output.

like image 374
David Avatar asked Dec 23 '10 00:12

David


1 Answers

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

like image 118
Donnie Avatar answered Nov 09 '22 05:11

Donnie