[android-developers] Camera preview center crop without SurfaceTexture

2014-04-25 Thread Sam Duke
Im trying to show a camera preview to the user of arbitrary size. What I'd like to do is pick an appropriate camera size based on the size of the preview, then effectively do a center-crop of the camera output into this (ie maintain aspect-ratio of the camera preview). As far as i can tell, the

[android-developers] Camera preview slowing down on re-adding callback buffer in onPreviewFrame()

2013-09-19 Thread TimeManx
I'm trying to capture frames from a camera preview so that I can do some image processing on the frames in the background while the user sees the camera preview. For that, I'm adding 60 buffers initially using addCallbackBuffer() in surfaceChanged() method of the SurfaceView and then on each

[android-developers] Camera preview freezes when I press HOME button

2013-07-25 Thread Linda Li
It would be easy to repeat the problem when I use an old device, which takes 1-2 secs to finish taking a picture. So when I press HOME button, while the device is taking picture, often times it freezes at the preview picture. I have added camera stopPreview and release in onPause(), which

[android-developers] camera preview aspect ratio VS device screen aspect ratio

2012-11-14 Thread Matej Oravec
Hello, do all Android devices with camera have to provide list of supported camera preview sizes (getting via Camera.getSupportedPreviewSizes()) that at least one of the sizes has the same aspect ratio as the device screen aspect ratio (fullscreen)? Or it can happen that on some devices will

[android-developers] Camera Preview started in C++ but rendered to a Java surface

2012-11-07 Thread Bammer
Is the following possible (if so, how) : I'd like to set up a layout in my java and add a view to it where the view contains a surfaceView for rendering the camera preview. But, I dont want to instantiate and start the camera in Java. I just want to set up the view so that I can keep the

[android-developers] Camera preview pixel/image format consistency

2012-11-06 Thread Charley Robinson
Hi all, I'm having trouble stabilizing a video pipeline using MediaCodec and Camera.PreviewCallback. I understand that specifying YV12 in Camera.setPreviewFormat should yield a tri planar YUV420 image in the preview callback. On the Nexus 7, this is the behavior I have seen, however the

[android-developers] Camera preview sizes on Galaxy Nexus (ICS)

2012-05-28 Thread Alex Cohn
The camera of Galaxy Nexus (software v. 4.0.2) reports * preview-size-values=1920x1080,1280x720,960x720,800x480,720x576,720x480,768x576,640x480,320x240,352x288,240x160,176x144,128x96 *; and really, it is possible to set *Parameters.setPreveiwSize(320, 240) *and after that

Re: [android-developers] Camera preview sizes on Galaxy Nexus (ICS)

2012-05-28 Thread Mark Murphy
On Mon, May 28, 2012 at 2:39 AM, Alex Cohn sasha.c...@gmail.com wrote: but also exposes a problem with the Camera API of Android: there is no way for Camera.setParameters() to fail or report anything about parameters inconsistency. This is due to backwards compatibility, because

Re: [android-developers] Camera preview sizes on Galaxy Nexus (ICS)

2012-05-28 Thread Alex Cohn
On Monday, May 28, 2012 1:48:35 PM UTC+3, Mark Murphy (a Commons Guy) wrote: On Mon, May 28, 2012 at 2:39 AM, Alex Cohn wrote: but also exposes a problem with the Camera API of Android: there is no way for Camera.setParameters() to fail or report anything about parameters

[android-developers] camera preview formats and sizes

2012-05-21 Thread Marco
hello, i would need to process camera preview frames of high quality in android. Is there a list of devices which are capable of using the ImageFormat.RGB_565 camera preview format? i would need to know supported preview formats and supported preview size before buying the device... (i can't use

Re: [android-developers] Camera preview

2012-03-20 Thread rachana govilkar
Hi, I am facing problem when i use your sample project code to open Front Facing Camera. Here is my error : Caused by: java.lang.RuntimeException: Fail to connect to camera service on line : camera=Camera.open(i); I have written all permissions required for camera and everything. So can you

[android-developers] camera preview problem

2012-01-21 Thread sktniran
Hi friends, i have to take picture from my application and need to store it database. i used following preview code in my app class Preview extends SurfaceView implements SurfaceHolder.Callback { // 1 private static final String TAG = Preview; SurfaceHolder mHolder; // 2 public

[android-developers] camera preview - android

2011-08-24 Thread Spoo
I am implementing a simple camera app and I see this in developer site: After taking a picture, preview display will have stopped. To take more photos, call startPreview() again first I am calling: camera.stopPreview(); camera.release(); in surfaceDestroyed() which is called after

Re: [android-developers] Camera preview crashes without SURFACE_TYPE_PUSH_BUFFERS

2011-06-29 Thread Latcho
Person: I want to do A). Am i doing something wrong? Mark: You are trying to do A). Please don't do that. On 6/27/2011 1:01 PM, Mark Murphy wrote: On Sat, Jun 25, 2011 at 4:16 AM, alexandros mouzakidis greatalexand...@gmail.com wrote: HI, i want to create a camera preview that is

[android-developers] Camera preview crashes without SURFACE_TYPE_PUSH_BUFFERS

2011-06-27 Thread alexandros mouzakidis
HI, i want to create a camera preview that is invisible, i have read (here) that i only have to not use the SURFACE_TYPE_PUSH_BUFFERS but when i do it my application crashes (i have tested it on the emulator) the code is this public CameraPreview(SCamera context, DrawView view) {

Re: [android-developers] Camera preview crashes without SURFACE_TYPE_PUSH_BUFFERS

2011-06-27 Thread Mark Murphy
On Sat, Jun 25, 2011 at 4:16 AM, alexandros mouzakidis greatalexand...@gmail.com wrote: HI, i want to create a camera preview that is invisible, i have read (here) that i only have to not use the SURFACE_TYPE_PUSH_BUFFERS but when i do it my application crashes (i have tested it on the

[android-developers] Camera preview, video streaming across phones

2011-06-08 Thread kypriakos
Hi all, Not sure if i am asking something that could be impossible to accomplish (that's why I am asking it anyway ;) ) - Currently I can remotely put the Android phone into a Picture preview, instruct it to snap a Picture and then view the picture on the remote site (through a browser). Is it

[android-developers] Camera preview error while recording

2011-06-07 Thread Samuel V.K
Hello all. Its my first time to get in here. I hav a issue during using MediaRecorder method. I'm testing this issue with two target devices HTC Legend(2.2) and Nexus S(2.3.3). The root problem is that preview doesn't work on Nexus S. As U see below source code, I did follow the state diagram

[android-developers] Camera Preview problem

2011-04-22 Thread mutans22
Hello there, While developing a camera application i am getting the following logs in logcat. Can some please throw some light on why the problem is occurring? 04-22 19:33:50.474: ERROR/v4l2_utils(1690): Error = Invalid argument from qbuf 04-22 19:33:50.474: ERROR/CameraHardwareSec(1690):

[android-developers] Camera preview Api

2011-02-15 Thread Jayanthi
Hi, I am trying to save images in sd card which is taken from camera in emulator, the following is the code to save images in sd card path = String.format(/sdcard/%d.jpg, System.currentTimeMillis()); outStream = new

[android-developers] Camera preview demo

2011-02-13 Thread Jayanthi
Hi Dude, I worked on camera preview for taking live image , Here I get following Exception java.io.FileNotFoundException: /sdcard/1297668185153.jpg (Permission denied) image is not saved in sd card can anyone tell me where i did mistake . Thanks in Advance, -- You received this

[android-developers] Camera preview demo

2011-02-13 Thread Jayanthi
Hi Dude, I worked on camera preview for taking live image , Here I get following Exception java.io.FileNotFoundException: /sdcard/1297668185153.jpg (Permission denied) image is not saved in sd card can anyone tell me where i did mistake . Thanks in Advance, -- You received this

Re: [android-developers] Camera preview demo

2011-02-13 Thread guru sagar
hi, check permissons in android manifest file On Mon, Feb 14, 2011 at 12:59 PM, Jayanthi jaia...@gmail.com wrote: Hi Dude, I worked on camera preview for taking live image , Here I get following Exception java.io.FileNotFoundException: /sdcard/1297668185153.jpg (Permission

[android-developers] Camera preview

2011-02-11 Thread Jayanthi
Hi dude, I am developing an application using camera preview I have done with the help of below URL http://marakana.com/forums/android/examples/39.html; but the image is not storing in sd card can anyone help please -- You received this message because you are subscribed to the

Re: [android-developers] Camera preview

2011-02-11 Thread Mark Murphy
That example has a flaw -- it hard-wires in /sdcard as the location of external storage. Use File.getExternalStorageDirectory() for that instead, or some other spot. Here is another sample project: https://github.com/commonsguy/cw-advandroid/tree/master/Camera/Picture This one is more complex,

[android-developers] Camera preview not restarting after picture taken

2010-12-23 Thread Stephen Lebed
Has anyone come across this and found a solution? I'm calling camera.startPreview() after the picture is taken, but the preview is frozen. Best, Stephen -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

Re: [android-developers] Camera preview not restarting after picture taken

2010-12-23 Thread Mark Murphy
Here is a sample project that does not suffer from this issue: https://github.com/commonsguy/cw-advandroid/tree/master/Camera/Picture If you see the same symptoms with this project, let me know what your device is. On Thu, Dec 23, 2010 at 3:10 PM, Stephen Lebed srle...@gmail.com wrote: Has

[android-developers] Camera Preview problems

2010-12-16 Thread sivaramkrishna neeruganti
hi all, i am running a camera preview application on froyo file system.i have got problems with the preview. the preview has got two preview surfaces side by side.i am able to see the preview on two surfaces at the same time.one surface showing slightly blurred preview compared with the preview

[android-developers] Camera preview issue on SDK 2.3 emulator?

2010-12-07 Thread blindfold
In testing my camera app in the SDK 2.3 emulator, I find that it runs OK *except* that the live camera preview is missing and instead shows a plain white area. Is anyone else experiencing this? Despite the live preview not showing, I can still do image processing as expected and redraw the

Re: [android-developers] Camera Preview not working on my G2

2010-10-20 Thread TreKing
On Wed, Oct 20, 2010 at 12:15 AM, Stephen Lebed srle...@gmail.com wrote: The error I'm getting in logcat is FATAL EXCEPTION: main Class Not Found Exception in dalvik.system.pathclassloader... Does it not tell you which class was not found? That would be helpful :-)

[android-developers] Camera Preview not working on my G2

2010-10-19 Thread Stephen Lebed
I'm trying to get the camera preview running on my G2. This is the code I'm testing with, which was taken from the sample code. It is using supplemental code supplied by Wu-Cheng, but its still throwing an error /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the

[android-developers] camera preview with graphics on top

2010-09-14 Thread cjayant
I am making an Android application that uses the camera- and also draws on the screen. Basically, I want to start out with the camera preview mode- and then when i double tap, take a photo. After the photo is taken, i want the screen to show a bitmap that i created from the photo. (i can

[android-developers] camera preview + takePicture + added graphics- help!

2010-09-10 Thread cjayant
I am making an Android application that uses the camera- and also draws on the screen. Basically, I want to start out with the camera preview mode- and then when i double tap, take a photo. After the photo is taken, i want the screen to show a bitmap that i created from the photo. (i can

[android-developers] Camera preview runs dark on Motorola i1

2010-09-08 Thread Mike Reed
Anyone have any experience with this? The barcode app, Yelp, and the Google sample app all show the camera preview as being dark. The camera app that comes with the phone looks normal, but all other apps that use the Camera.startPreview() code show up with what looks like a 50% opacity black

[android-developers] Camera Preview Zoom in Android

2010-09-06 Thread uday
Hi All, I've a problem with Camera Preview Zoom.. The methods present in Android 2.2, setZoom() is not working to zoom the preview.. Is there any another way to do the Zoom in android?? Im using the code present in the Android API Demos.. Is ther any body who has worked on implementing ZoomIn

Re: [android-developers] Camera Preview Zoom in Android

2010-09-06 Thread nagaraj attimani
Please check is SetZoom implemented in HAL. and also setparameters in HAL will be called whenever you trying to change zoom level In setparameters() in HAL, Setzoom should be called. Setzoom() will send IOCTL command to native camera driver to set the zoom. On Tue, Sep 7, 2010 at 9:58 AM, uday

[android-developers] Camera preview - strange on Samsung Galaxy S (2.1update1)

2010-07-09 Thread Mathias Lin
In my activity I show the camera preview on a surfaceView. It works perfectly fine on Nexus One (2.1update1, 2.2) and HTC Desire (2.1update1), but on Samsung Galaxy S (2.1update1) I see strange lines, weird proportions and everything three times. see the screenshot

Re: [android-developers] Camera preview - strange on Samsung Galaxy S (2.1update1)

2010-07-09 Thread dan raaka
what verison does your device have ? use below .. $adb shell getprop | grep fingerprint -Dan On Fri, Jul 9, 2010 at 9:39 AM, Mathias Lin m...@mathiaslin.com wrote: In my activity I show the camera preview on a surfaceView. It works perfectly fine on Nexus One (2.1update1, 2.2) and HTC Desire

[android-developers] Camera preview - works on all devices apart from the Droid

2010-05-24 Thread mscwd01
Hey, This is my code I use to display a preview from the camera on a SurfaceView: public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { Camera.Parameters parameters = mCamera.getParameters(); ListSize cameraSizes =

[android-developers] Camera Preview to RGB565

2010-02-01 Thread Zia
Hi, I'm trying to convert camera preview image (YUV420 format) , that I receive inside onPreviewFrame event, to RGB565 format. Idea is to do it after every 20 seconds. I found the following post regarding YUV420-RGB565 conversion, but it seems i'm doing soemthing wrong when passing the size of

[android-developers] Camera Preview size and zoom

2010-01-12 Thread nemo
Hi! all Could I set camera preview size higher than the screen resolution? And Can I only show part of camera preview region on screen? I'd like to set higher resolution of camera preview size and only get center part of this camera preview data. It's simular to 'zoom in' function. I think I

[android-developers] Camera preview from API demos looks weird in HTC Hero

2010-01-10 Thread a beginer
I am trying to run the camera preview example from the API demos on my HTC Hero (Sprint). However, the preview looks grainy and unclear. Are there any device specific settings that I need to be aware of? -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Camera Preview Filter Choppiness

2009-12-06 Thread Greg
Hello, I've been working on creating a program that will output the Camera Preview with various user-chosen filters (SnapPhoto has this functionality) and I've run into some problems. I have the following set up. - Camera preview set to a SurfaceView (I had to set PUSH_BUFFERS or the program

[android-developers] Camera preview in activity view

2009-08-27 Thread tinyang
Hello. I just got my camera preview working for my app, but it is not appearing where I want it to appear, and I'm not sure how to get it there. Instead of using the entire screen for the preview, I would like to put it inside a surfaceview in an activity xml gui. What do I need to change?

[android-developers] Camera preview

2009-08-27 Thread tinyang
Hello. I just got my camera preview working for my app, but it is not appearing where I want it to appear, and I'm not sure how to get it there. Instead of using the entire screen for the preview, I would like to put it inside a surfaceview in an activity xml gui. What do I need to change?

[android-developers] Camera Preview on Emulator

2009-08-11 Thread swapnil kamble
Hi, I want to preview my camera on emulator. I have also written small app for that. But it only show black and white squares and gray square moving. Does anybody has any idea about this ? Thanks in advance, Swapnil --~--~-~--~~~---~--~~ You received this message

[android-developers] Camera preview on an OpenGL surface....

2009-07-15 Thread Richard Schilling
Just getting started with OpenGL surfaces, really. I'd like to display a camera preview in the background on its own surface (no problem there). And, I'd like to draw on another surface layered on top of that with a OpenGLSurfaceView. But the OpenGLSurfaceView completely blocks the view camera

[android-developers] Camera Preview Sample

2009-07-06 Thread Gerby
Hi, has anyone of you a sample code which uses the camera preview callback in help with the SurfaceHolder.SURFACE_TYPE_NORMAL? I want to generate a own preview to analyse the picture and to display some infos into the picture. but i still have some problems to display a own preview ( only the

[android-developers] Camera preview and sensor orientation values

2009-07-03 Thread lufo
Hi all, I'm trying to use Camera preview in combination with Orientation sensor. I got a serious problem with the sensor when using the preview: values returned by the sensor are as (1.6893509E-9, -4.0, 0.0) instead of being in degrees (especially the former). I tested that not creating the

[android-developers] Camera Preview 90 degree rotated

2009-06-08 Thread Bishwanath Singh
Hi All, I am really bugged up with this issue. Please help.When camera is launched in portrait mode, the viewfinder screen is 90 degrees rotated and stretched out. I read couple of places that this is a known bug with sdk1 but i am still finding this problem with cupcake. Has anyone having any

[android-developers] Camera preview callback and garbage collector

2009-05-25 Thread Bo
It seems that, according to the log, the garbage collector is busy at freeing passed byte arrays on every preview callback. That's a waste of time. Why don't we create an array before the preview callback is set and write that one? Best, Bo --~--~-~--~~~---~--~~

[android-developers] Camera preview zoom?

2009-05-21 Thread moa
Currently the camera performs previews of the shot at 480x320 allowing for real time processing. Is it possible define what part of full 1536x2024 camera image is used for the smaller preview image? Basically some kind of zoom? I am trying to get a more detailed part of the image, without have

[android-developers] Camera preview different from captured image

2009-04-21 Thread Jon Webb
Has anyone noticed that the camera preview image field of view is slightly smaller than the captured image? That is, if, using the capture application I align the top of the camera preview with some object in the scene, and then capture, the captured image will extend noticeably outside the

[android-developers] Camera preview in ScrollView | Camera SurfaceView in XML layout

2009-03-10 Thread aklz
All, is it possible to display a camera SurfaceView in a ScrollView? Also, does anybody have sample code to display a camera SurfaceView using an XML layout? I've only been able to display a camera SurfaceView in my current view by calling addContentView. This overlaps the current view which

[android-developers] Camera Preview is rotated 90. (auto rotates unless keyboard is out)

2008-12-20 Thread chrispix
Hopefully this makes sense. I have a camerapreview on a surface, the issue is that it rotated 90degrees. If I rotate the phone the camera preview is still rotated 90 degrees, so it must be using the accelerometer to determine upright. If I slide the keyboard out, it fixes it and the image is

[android-developers] Camera preview after long delay, progress window

2008-11-18 Thread Jon Webb
I'm having a hard time starting a camera preview after a long delay (several seconds) while my program initializes. I've experimented with various methods of starting the camera preview but no matter how I do it, the screen is black until I stop and resume the program (i.e. go to the main screen

[android-developers] Camera preview on G1 only works in landscape ?

2008-11-07 Thread Jason Proctor
this problem appears to be unit dependent. on my G1, the camera orientation is always wrong. on the G1 belonging to a colleage, it's correct. this would suggest that if i set rotation, it would fix some phones and break others. are the G1 hardware camera parameters documented anywhere apart

[android-developers] Camera preview on G1 only works in landscape ?

2008-11-04 Thread jarkman
I'm using camera preview on the G1, using code from CameraPreview in ApiDemos. I'm seeing the preview image appear stretched rotated unless my screen orientation is set to 'landscape' in the manifest. I can reproduce the same effect by changing the manifest for ApiDemos, setting the screen

[android-developers] Camera Preview onto SurfaceView using xml

2008-07-07 Thread Bobalot
ugh, it seems that the 1st post i made never actually appeared, so what i am trying to do is make a simple camera application, one with a surfaceview and a button which are defined in the layout xml, to preview the camera and then take an image, but every time i try to map the preview onto

[android-developers] Camera Preview onto SurfaceView using xml

2008-07-07 Thread Bobalot
hi, im trying to make a simple camera app, by extending the CameraPreview class in the api demos, anyway im trying to cast the preview onto a surfaceview that i have defined in my layout xml file. but everytime i do this i get a null pointer exception, and i cant for the life of me figure out how