Discussion:
Using the ndk interface to operate the camera, how to set the camera capture image fps, height and width
周青
2018-06-14 06:24:29 UTC
Permalink
0down votefavorite
<https://stackoverflow.com/questions/50850671/using-the-ndk-interface-to-operate-the-camera-how-to-set-the-camera-capture-ima#>

I use the ndk interface to successfully open the camera, but fps and other
parameters can not be set

camera_status = ACameraManager_getCameraCharacteristics(cameraManager, selectedCameraId,
&cameraMetadata);

camera_status = ACameraManager_openCamera(cameraManager, selectedCameraId,
&deviceStateCallbacks, &cameraDevice);ACameraCaptureSession_setRepeatingRequest(captureSession,&captureSession_captureCal
lbacks, 1, &captureRequest, NULL);
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/768b7c07-19f6-4ed8-9e31-6b44d3d75f4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Florian Limberger
2018-06-19 07:55:09 UTC
Permalink
Hi,

parameters like the FPS are set on the capture request:

- https://developer.android.com/ndk/reference/group/camera#acapturerequest
- https://developer.android.com/ndk/reference/group/camera#acapturerequest_setentry_i32
int32_t fpsRange[2] = {fps, fps};
ACaptureRequest_setEntry_i32(captureRequest,
ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, 2, &fpsRange[0]);

Regards


flo
0down votefavorite
<https://stackoverflow.com/questions/50850671/using-the-ndk-interface-to-operate-the-camera-how-to-set-the-camera-capture-ima#>
I use the ndk interface to successfully open the camera, but fps and other
parameters can not be set
camera_status = ACameraManager_getCameraCharacteristics(cameraManager, selectedCameraId,
&cameraMetadata);
camera_status = ACameraManager_openCamera(cameraManager, selectedCameraId,
&deviceStateCallbacks, &cameraDevice);ACameraCaptureSession_setRepeatingRequest(captureSession,&captureSession_captureCal
lbacks, 1, &captureRequest, NULL);
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/f21ca434-d2ee-4a2b-9028-010d274c5a67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
周青
2018-07-09 07:27:24 UTC
Permalink
I try to set fps 30 or 15.
the count of image every second from camera is same.this is not 30 or 15 to
output.
please
int32_t mFramerateRange[2] = {30,30};
or
int32_t mFramerateRange[2] = {15,15};
ret = ACaptureRequest_setEntry_i32(mCapture_request,
ACAMERA_CONTROL_AE_TARGET_FPS_RANGE,2,mFramerateRange);

圚 2018幎6月19日星期二 UTC+8䞋午11:23:42Florian Limberger写道
Post by Florian Limberger
Hi,
- https://developer.android.com/ndk/reference/group/camera#acapturerequest
-
https://developer.android.com/ndk/reference/group/camera#acapturerequest_setentry_i32
int32_t fpsRange[2] = {fps, fps};
ACaptureRequest_setEntry_i32(captureRequest,
ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, 2, &fpsRange[0]);
Regards
flo
0down votefavorite
<https://stackoverflow.com/questions/50850671/using-the-ndk-interface-to-operate-the-camera-how-to-set-the-camera-capture-ima#>
I use the ndk interface to successfully open the camera, but fps and
other parameters can not be set
camera_status = ACameraManager_getCameraCharacteristics(cameraManager, selectedCameraId,
&cameraMetadata);
camera_status = ACameraManager_openCamera(cameraManager, selectedCameraId,
&deviceStateCallbacks, &cameraDevice);ACameraCaptureSession_setRepeatingRequest(captureSession,&captureSession_captureCal
lbacks, 1, &captureRequest, NULL);
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/e5de8717-bc7d-4544-b1ec-a1f0cfb6e6cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
周青
2018-07-10 02:21:20 UTC
Permalink
I have fixed this issue.thank you.

圚 2018幎6月19日星期二 UTC+8䞋午11:23:42Florian Limberger写道
Post by Florian Limberger
Hi,
- https://developer.android.com/ndk/reference/group/camera#acapturerequest
-
https://developer.android.com/ndk/reference/group/camera#acapturerequest_setentry_i32
int32_t fpsRange[2] = {fps, fps};
ACaptureRequest_setEntry_i32(captureRequest,
ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, 2, &fpsRange[0]);
Regards
flo
0down votefavorite
<https://stackoverflow.com/questions/50850671/using-the-ndk-interface-to-operate-the-camera-how-to-set-the-camera-capture-ima#>
I use the ndk interface to successfully open the camera, but fps and
other parameters can not be set
camera_status = ACameraManager_getCameraCharacteristics(cameraManager, selectedCameraId,
&cameraMetadata);
camera_status = ACameraManager_openCamera(cameraManager, selectedCameraId,
&deviceStateCallbacks, &cameraDevice);ACameraCaptureSession_setRepeatingRequest(captureSession,&captureSession_captureCal
lbacks, 1, &captureRequest, NULL);
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/8c3320fb-9245-4037-a1b4-dc6991ea0c5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
m***@gmail.com
2018-08-09 03:52:31 UTC
Permalink
Hi 呚青,

*would you please post your fix?*

*Thanks,*
*Thomas*
Post by 周青
I have fixed this issue.thank you.
圚 2018幎6月19日星期二 UTC+8䞋午11:23:42Florian Limberger写道
Post by Florian Limberger
Hi,
-
https://developer.android.com/ndk/reference/group/camera#acapturerequest
-
https://developer.android.com/ndk/reference/group/camera#acapturerequest_setentry_i32
int32_t fpsRange[2] = {fps, fps};
ACaptureRequest_setEntry_i32(captureRequest,
ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, 2, &fpsRange[0]);
Regards
flo
0down votefavorite
<https://stackoverflow.com/questions/50850671/using-the-ndk-interface-to-operate-the-camera-how-to-set-the-camera-capture-ima#>
I use the ndk interface to successfully open the camera, but fps and
other parameters can not be set
camera_status = ACameraManager_getCameraCharacteristics(cameraManager, selectedCameraId,
&cameraMetadata);
camera_status = ACameraManager_openCamera(cameraManager, selectedCameraId,
&deviceStateCallbacks, &cameraDevice);ACameraCaptureSession_setRepeatingRequest(captureSession,&captureSession_captureCal
lbacks, 1, &captureRequest, NULL);
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/2ebdf07d-0564-43bf-b7c2-85ea2490f18e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...