Questions tagged [previewcallback]

11 questions
2
votes
0 answers

Android KitKat(4.x.x)'s PreviewCallback is must want SurfaceHolder?

I Have a Question. Android KitKat(4.x.x)'s PreviewCallBack is must want SurfaceHolder? Because My Preview project PreviewCallBack is work very well in Android 6.x, 7.0. And it doesn't use SurfaceHolder. But My PreviewProject in KitKat,…
2
votes
0 answers

Android - OnPreviewFrame not called

This is my cameraPreview I have set the listener in SurfaceChanged. I can see the camera inside the app - yet the OnPreviewFrame is never called. Here is most of the code public class CameraPreview extends SurfaceView implements…
2
votes
0 answers

Many callback buffers for camera preview

I'm working with camera in Android and I'm using preview callback with byte buffer. If I call the function addCallbackBuffer many times, it will add several buffers. In what order will be used added buffers when the catching frame - in order of…
2
votes
0 answers

How can I add thermal effect to YUV image

After googling a lot. I find a way to change Preview of a single frame. Correct me if i am wrong. camera.setPreviewCallback(new PreviewCallback() callBack let you get the frame of a Camera in byte. Now you can save it or modify it. First of…
Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300
1
vote
1 answer

android camera2 preview lag when getting frame

I am using Android camera2 in order to extract frames in real time in preview mode to stitch them in NDK side(openCv). I use ImageReader surface to get frames, but it is limited to a max frame…
1
vote
1 answer

onPreviewFrame() not being invoked

I want to continuously receive frames from the camera and manipulate them. Since the manipulation will be a CPU heavy task, i have opened the camera on a separate handler thread so that any callbacks land on that thread as well. However, the problem…
Abdul Wasae
  • 3,614
  • 4
  • 34
  • 56
1
vote
1 answer

How to make threads work in Series

I have created a CameraApp. And getting byte[] cameraPreviewCallback in onPreviewFrame(byte byteArray[] , Camera camera) I am converting these byteArray to rgb and doing a lot of stuff too. So It is working slowly. So I think I should get benefit…
1
vote
1 answer

Android: mPrevCallback to JPG, results in black pictures

I am trying to capture the preview of the camera on a surfaceview ,to save it as a JPEG in the internal memory. I found some code here on this site, that does mostly I want but saves the image to the SD Card. I changed that, and came up with the…
Herrmann336
  • 21
  • 1
  • 2
0
votes
4 answers

Android Camera dropping frames by of work in the PreviewCallback

For an Android project I have to analyze camera frames real-time. Now I use the ‘android.hardware.Camera.PreviewCallback’ to receive the camera frames. The problem is that while I try to analyze the frames my FPS drops from 30 fps to 15 fps while I…
Epler
  • 1
  • 2
0
votes
1 answer

How start SurfaceHolder.Callback() event if Button Clicked?

i tried to start SurfaceCallback of Camera if Button Clicked, but i cannot , if i did Camera.setPreviewCallback() does not invoked although it works in i invoked SurfaceHolder.Callback() from onCreat()method as shown in code below public class…
Error
  • 820
  • 1
  • 11
  • 34
0
votes
1 answer

Save PreviewFrame as JPEG on external storage (Android)

I am trying to save the preview frames from the camera on the external storage of my device. These are the permissions in my Manifest:
SparklingWater
  • 358
  • 4
  • 15