Questions tagged [cameraapi2]
8 questions
10
votes
1 answer
Touch based focus with Camera API2 on android
I am trying to implement touch based focus on Android using cameraApi2. It work sort of but it doesn't seem to work always for me. My implementation is as follows:
First I create Camera PreviewSession with the following steps:
mPreviewRequestBuilder…

Vikas
- 4,263
- 1
- 34
- 39
2
votes
1 answer
Change torch brightness while camera preview is working in android
In Android 13 (API 33) a new control is appeared to adjust torch brightness:
public void turnOnTorchWithStrengthLevel ( cameraId, int…

Alexei Maiyorov
- 21
- 1
1
vote
0 answers
reduce encoder frame rate
I am tying to limit the frame rate to 5-10 fps.
The encoded frame are being sent though web-socket connection and my goal is to limit bandwidth to 1Mbps while having good quality for larger resolution.
my current attempt is:
val format =
…

mohammad aljammali
- 51
- 1
- 8
1
vote
1 answer
Weird image using samsung s10e with camera api2
Phone: samsung s10e
Android 11
API Level 30
I made an app for android samsung s10e which takes an image using the camera api 2 in android.
https://developer.android.com/reference/android/hardware/camera2/package-summary
I was able to take and save…

Mhmd
- 11
- 2
1
vote
0 answers
How to fix app crash after calling setResult then finish from surfaceview with cameraapi2
App crash after reading camera output from cameraapi2 with surface view.
This is the code to get the image and submit to another controller.
Intent resultIntent = new Intent();
resultIntent.putExtra(ConstKeyVariables.strProfileImage,…

topspindex
- 41
- 5
0
votes
0 answers
Kotlin Camera ID visible, but can not get preview (For secondary camera)
I'm trying to create custom camera app with API2, but stuck with such problem, main and front cameras are giving normal preview, but secondary infrared camera present in list, but when i'm switching to it, i don't get any preview, just stucked…

Ivan
- 325
- 3
- 9
0
votes
0 answers
Kivy Android Camera API 2 - Camera Rotation
I am using the camera feature defined in the following repo but with some changes. I just want to rotate the SurfaceTexture defined in camera2.py so that the camera can also work in portrait mode.
I tried Push- and Pop- Matrix solution but it…

Fazilet Gokbudak
- 13
- 6
0
votes
1 answer
Android NDK Camera Sample JPEG at 30 Hz
I have been using the Android NDK Camera sample and with it one is able to read the frames with format AIMAGE_FORMAT_YUV_420_888 by using the yuvreader_ inside DrawFrame at 30 Hz. I validated that 30 Hz is achieved by recording the timestamp in each…

jaraujo
- 372
- 2
- 10