Ahhh camera woes - plz help :( :(

All your problems with Audio, Video and Images.

Ahhh camera woes - plz help :( :(

Postby MrSlowestD16 » Mon Apr 04, 2011 6:26 am

Hey,

Right, so I've been at this for the last 10 hours (literally), and I'm kind of at my breaking point.

I'm very new to android dev, but I kind of know the basics from reading. This is my first app, but unfortunately, I'm on a very truncated time table with it.

Anyway, I'm trying to use the camera to capture a photograph in raw data (I need it raw as I need to modify particular pixels).

All day, and 1001 tutorials later, I'm screwing with the concept of anonymous SurfaceHolder.Callback object (implementing surface changed, surface created, and surface destroyed). Then like within the last 30 minutes I find out I can substitute the SurfaceView (in the XML layout) with an ImageView, and make an intent to take a picture, launch the camera, and get the data results back into the imageview in the previous activity - total of like 5 lines.

So what's what? Why are so many tutorials focused on this SurfaceView/SurfaceHolder.Callback concept, when it only takes 5 lines to implement the camera activity..I thought that was the whole purpose of intents, no?

So do I pursue the SurfaceHolder.Callback method? (that method was failing me because when I do camera.startPreview(); it hangs, then I get "Camera ERROR 0" in LogCat), Or do I go with this image view methodology?

Requirements I need to meet:
  • The picture I put in the image view is highly pixelated, even for a thumbnail, if I use these two lines:
    Code: Select all
    Bitmap thumbNail = (Bitmap)data.getExtras().get("data");
    mImageViewer.setImageBitmap(thumbNail);

    ... Is the data all in that thumbnail, and the thumbnail quality just scaled down? Or did that data get lost? If it's lost, I can't have that, I need all picture data.
  • Is there a way to modify that data returned from the camera activity at the pixel level (ie. a RAW encoding)?
  • SurfaceHolder.Callback vs ImageView (which approach?)
  • I need a full quality thumbnail at some point after I tweak some pixels, but I can't care less if it previews it live or not, I can just as easily get it from the camera activity if possible
  • This needs to be (I rather have it) compatible with SDK 3 (1.5) (I have another dev who needs to use his phone and he has a G1 running 1.5)

TIA, I'm pulling my hair out, at wit's end, etc.
User avatar
MrSlowestD16
Freshman
Freshman
 
Posts: 2
Joined: Sun Apr 03, 2011 8:54 pm

Top

Re: Ahhh camera woes - plz help :( :(

Postby strider2023 » Tue Apr 05, 2011 8:16 am

What type of changes do you want to make in your picture??
strider2023
Senior Developer
Senior Developer
 
Posts: 126
Joined: Tue Mar 02, 2010 6:34 am
Location: Chennai, India

Re: Ahhh camera woes - plz help :( :(

Postby MrSlowestD16 » Tue Apr 05, 2011 3:04 pm

strider2023 wrote:What type of changes do you want to make in your picture??


Changing pixel color values (hopefully I can change RGB between 0 and 255 or something).

It'd be nice if I can address pixels by X,Y coordinates.

Though seeing as apparently NOBODY seems to know ANYTHING about this I'm kind of floating in the water..this is BS :( - it's like I'm the only one that's tried interfacing with the camera before...

Tons of people have tutorials (including android) on this dumb surface idea, but I can't even get a clear definition of what the hell a "SurfaceView" actually is, none-the-less why you NEED one to use the camera (apparently that's only on Sundays or something because you can still call it via intents..but for some reason no camera tutorial does...

Being a full time software developer, I can really say, unless I'm mis-understanding some vital concept to this "surface" approach, this system sucks. Maybe I'm missing something really big?? I've been trying to find some OSS apps that use the camera...so any of those would be great.. I found the barcode scanner, but I can't even figure out where that thing begins..
User avatar
MrSlowestD16
Freshman
Freshman
 
Posts: 2
Joined: Sun Apr 03, 2011 8:54 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 10 guests