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
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
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
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
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
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
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
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
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
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
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
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
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
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
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) {
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
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
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
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):
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
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
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
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
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
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,
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
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
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
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
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 :-)
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
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
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
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
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
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
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
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
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 =
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
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
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
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
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?
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?
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
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
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
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
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
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
--~--~-~--~~~---~--~~
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
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
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
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
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
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
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
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
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
60 matches
Mail list logo