How To Manually Display Frames From Camera
Dec 5, 2010
I have built a face detection app where I get the frames from onPreviewFrame, do the face detection and then draw a circle on a canvas above my surfaceView. The problem is frames are automatically displayed using the surfaceview thread when Camera.StartPreview() is started. This is obviously necessary for the PreviewCallback to kick in. As the processing, face detection and drawing, is done in a separate thread(I am assuming here), there is a 2 second delay between the frame being displayed and the result of that frame being processed and drawn on the canvas.
What I want to do is stop the camera preview displaying the frames and display them myself after processing. I believe this has three benefits:
The delay with disappear.I can draw straight to the bitmap instead of on a canvas which is useless as you can not undo what you have done.It will keep memory consumption low by not having two threads using the same image.
I've read that it is possible to display frames from the previewCallback, how to stop the frames being displayed automatically?
View 2 Replies
Sep 7, 2010
I want to display animated gifs in my aplication.
As I found out the hard way Android doesn't support animated gifs natively.
However it can display animations using AnimationDrawable:
http://developer.android.com/guide/topics/graphics/2d-graphics.html#frame-animation
The example uses animation saved as frames in application resources but what I need is to display animated gif directly.
My plan is to break animated gif to frames and add each frame as drawable to AnimationDrawable.
Does anyone know how to extract frames from animated gif and convert each of them into Drawable?
View 2 Replies
View Related
Jul 31, 2010
I am writing an app to capture the camera preview frames and convert it to bitmap in Android.
Here is my code:...........
After I start preview, the callback got called with data, but the bitmap is null.
What did I do wrong when convert the byte array to BitMap?
View 2 Replies
View Related
Aug 7, 2010
So I'm taking pictures with the EVO to post here and while I'm holding the phone watching the autofocus do its thing, and when it finally takes the pic, its settles on a focus that is not as sharp as it could be. While it is focusing, there are moments when the autofocus will have focused perfectly but it keeps focusing past that point.. I looked through ALL the settings and couldn't figure it out... Is there a way to manually focus the camera other than physically moving the camera forward or backwards?
View 6 Replies
View Related
Oct 8, 2013
i was wondering if there is a mod for controlling the camera focus manually using some keys, eg: volume up/down, because the AF always gets wrong for my macro shots..
View 2 Replies
View Related
Oct 3, 2010
I have tried many of those camera apps from market, like camera 360, but non of them can adjust shutter speed/exposure way I wanted. Say, I want a long exposure for night photo. For example I would like input exposure value to app, so that it would expose photo for 10 seconds.know app to change exposure/shutter speed?
View 9 Replies
View Related
Aug 18, 2010
Images taken from Camera do not display; they are generic gray icons and not the photos taken. The camera worked perfect first couple days and now we are only seeing icons. Maybe we made a change but can't seem to find a resolution in any menu.
View 1 Replies
View Related
Jun 9, 2010
I'm using a Nexus One and the Camera displays horizontal when it should be vertical and vice versa. I've no idea what's wrong. The code works fine on a HTC tattoo.
class Preview extends SurfaceView implements SurfaceHolder.Callback {
SurfaceHolder mHolder; Camera mCamera; Preview(Context context) { super(context);
// Install a SurfaceHolder.Callback so we get notified when
//the // underlying surface is created and destroyed.
mHolder = getHolder(); mHolder.addCallback(this);
mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
} public void surfaceCreated(SurfaceHolder holder) {
// The Surface has been created, acquire the camera and tell
//it where // to draw. mCamera = Camera.open(); try {
mCamera.setPreviewDisplay(holder); } catch (IOException e) {
// TODO Auto-generated catch block e.printStackTrace();
} } public void surfaceDestroyed(SurfaceHolder holder) {
// Surface will be destroyed when we return, so stop the
//preview. // Because the CameraDevice object is not a shared resource,
//it's very // important to release it when the activity is paused.
mCamera.stopPreview(); mCamera = null; }
public void surfaceChanged(SurfaceHolder holder, int format, int
w, int h) { // Now that the size is known, set up the camera parameters
//and begin // the preview.
Camera.Parameters parameters = mCamera.getParameters();
parameters.setPreviewSize(800, 480);
mCamera.setParameters(parameters); mCamera.startPreview();
}
View 1 Replies
View Related
Jan 18, 2014
I can't display the custom camera image in other Activity. I have an Activity called CamTestActivity for custom camera and this activity have onClick button .When click on this button display that image in other Activity called Imageset Activity, set that image in ImageView.
View 2 Replies
View Related
Aug 19, 2010
I am trying to display a filtered version of the camera preview.
The code runs without errors but the device is showing the preview instead of the generated bitmap.
This is the code for my (very small) Activity: http://code.google.com/p/ruellia/source/browse/ruellia/src/br/com/ximp/ruellia/RuelliaActivity.java
I suspect the view layering and the surface holder type, but so far no luck... anyone?
View 1 Replies
View Related
Sep 7, 2010
When in the camera and you hit the play button to review pictures, all pictures on the phone come up instead of just the ones i've taken with my camera. Is there a setting to change for this? Do i need to move my photos to a specific folder to avoid this? Right now i have all my pictures in the "media" folder. The camera pictures are in the DCIM folder. So how can this be changed?
View 3 Replies
View Related
Aug 19, 2009
I'd like to have code sample (xml & java) of how I can overlay buttons (any view) into a camera video preview. Of course I'd like real Buttons : no bitmap of the button over a video. I need to keep the clicked event, button pressed/up functionality, etc
Where can I find such Tutorial ?
View 3 Replies
View Related
Jun 15, 2010
HTC Incredible came pre-loaded with Photo Frames Widget.It shows a full page frame with your photo albums and you can swish between photos while viewing your home page. While using ADW Launcher, I no longer get that as a choice to install any one know of another app that's similar? Or a way to get the HTC apps used on ADW Launcher?
View 1 Replies
View Related
Jul 22, 2010
Trying to play animated GIFs on Android here
(see http://stackoverflow.com/questions/809878/android-how-do-a-display-a-large-animated-gif-given-a-url).
It's anything but smooth. On Android 1.5, the Movie.decodeStream()/decodeFile() returns a null. On Android 1.6, with the GIF files I've got, it returns a zero-sized movie with zero duration - clearly not adequate.
The referenced question suggests splitting the GIF into frames (and then rendering these). How exactly do i accomplish that, please? Tried opening one of my GIFs with GNU giflib in Windows. It choked on the very first frame. The GIF itself is all right, all browsers (save Android's) display and animate it fine. Worked with giflib 4.1.4. Not sure what was broken in 4.1.6, but there you go. Next step: build giflib for Android via NDK, somehow integrate with the Bitmap class. giflib it is. In conjuction with Bitmap.copyPixelsFromBuffer. The colors are all askew right now, but the basic design seems workable.
View 1 Replies
View Related
Feb 18, 2010
I have just updated my hero phone and I was surprised it worked ok, normally things for me go wrong. However before when using the camera the zoom bar appeared on the left hand edge of the camera display and I could zoom using the trackball.
Now it has an icon on the left to go to my albums and no zoom scale. I can select it from the menu but again I cant zoom using the trackball. Anyone know how to get this back if possible?
View 1 Replies
View Related
Nov 11, 2010
Is there an app that lets you view your frames per second in real time in video games and emulators?
View 2 Replies
View Related
Apr 10, 2009
So with Cupcake looming, does anyone know what kinda Frames per second the video recorder will have?
View 2 Replies
View Related
Jan 14, 2012
For 2D or 3D applications (like GTA III for instance), I would like to be able to tell what FPS the game is running at pretty much for benchmarking purposes.
A game called osu!droid can show FPS in the bottom right corner, but this option can be enabled or disabled via it's options:
I would figure Android SDK for Windows to have some sort of way to see this, but I couldn't find anything. If there is a way to display FPS via the SDK (or maybe an app).
View 8 Replies
View Related
May 20, 2009
Iīm trying to capture frames from a video file, but I donīt know how to do it. Are there any classes like FrameGrabbingControl (in JMF) for Android? Is it possible with MediaPlayer and MediaRecorder classes?
View 2 Replies
View Related
Dec 31, 2009
I am trying to decode and obtain all frames in a video stream, each of which would be processed by a native signal processing engine and re-encoded back to a MPEG4/MP4 file. I noticed that there was a getFrameAt() function in earlier versions of SDK but its not available in v 1.6 on which I am working. As I am fairly new to Android, I would like to know from more experienced people around here as to how I can extract video frames into a buffer for processing.
View 2 Replies
View Related
Dec 30, 2013
i know how to create bootanimaton.zip file but i want to know how do you create animation frames for that zip file
View 3 Replies
View Related
Aug 25, 2010
I've been trying to make a simple live wallpaper out of a boot animation. So basically i have about 50 .pngs in my drawable folder. I'm able to set the animation to about 10-20 frames and it works great. But once i set it to about 30 frames...I get an OutOfMemory Error. I was hoping maybe someone could take a look at my code and maybe give an example of how I could achieve more frames? That would help so much i've been looking at this for hours > <
Here's my code:..................
And here's a logcat if that'll help at all:
CODE:...............
View 4 Replies
View Related
Feb 3, 2009
I would like to know how to read in an image file which has multiple frames in it. Something like an animated gif file. I would like to perform frame by frame animation with a file of this type. I don't want to have each frame as drawables in the resource directory. Can anyone throw some light on how to perform the above mentioned tasks.
P.S - I have already checked the example in the API demos where an animated gif is read as an object of type Movie. I don't want to read it in as a movie file.
View 3 Replies
View Related
Feb 1, 2010
I would like to know if it is possible to remove one of the frames I added using addFrame in Android?
View 1 Replies
View Related
Dec 6, 2009
My camera stopped working. When I click my camera application I get the message "The application camera (process com.android.camera) has stopped unexpectedly. Please try again". It's just a blank screen?
View 3 Replies
View Related
Mar 16, 2010
I have a project that requires a view to be animated whenever the user performs a certain action - perhaps twenty frames or so, with a total duration of a second. There's more work required than just updating the view, so the animation classes are not helpful.
Right now my test program uses a very simple method: I have a handler that is called to start the animation. The handler's handleMessage() method calculates the new frame, invalidates the view, and calls sendMessageDelayed(obtainMessage(0), 50); However, the animation isn't smooth - especially, for some reason, in landscape mode. Portrait mode seems much better (on a G1, if it matters).
This suggests to me that this isn't the right way to... handle... this problem. What would be a better way? Calculating time deltas? Starting a new thread whenever the animation starts and having it repeatedly calculate and invalidate instead of relying on the handler, even though it means creating and destroying a new thread every time? (most of the time the program is idle; the user interacts with it every few seconds, typically). Starting a thread and leaving it running?
Whether that's the right way or not, what's the most accurate way on Android to measure time, and to sleep for a specific duration?
View 3 Replies
View Related
Jan 26, 2010
Possible Duplicate:
Getting frames from Video Image in Android
I wanted to know if it is possible to extract frames from a running Video in Android? I need to extract frames at regular intervals and send them for further processing.
Would someone be able to find an answer for me?
View 1 Replies
View Related
May 4, 2010
Is it possible to disable title bar display dynamically after setting the content view by setting the NoTitlebar theme?
All the posts I have read told that any title bar changes we can make only before setContentView() call.
View 4 Replies
View Related
Sep 20, 2010
I am facing one problem in message view. Bacically what I need to do is in message view I want to mark any telephone number or web address in different color. Can anyone please tell me where exactly the text is been written in Message View? On clicking this items it should launch appropriate event. If anyone touches a telephone number it should launch the dialer or if it is a valid email address then it should launch the Compose message event and so on.
Another question is whether to display message is Android uses the WebView?
View 2 Replies
View Related
Jun 26, 2010
Hello there I have a problem regarding the new HTC Magic I purchased : in my text display where I read the conversations between me and my contacts... it has all of the messages I sent in 1 group together, and all of the messages my contacts have sent together. How do I change this to display the order in which they were sent and received? For example right now it is
ME : blahblahblah
ME : blahblahblah
ME : blahblahblah
You : blahblahblah
You : blahblahblah
You : blahblahblah
View 3 Replies
View Related