opencv-documentscanner-android
opencv-documentscanner-android copied to clipboard
CaptureResult in CaptureCallback always returns zero
Hi, the program is running fine but it goes to take picture is this point of code afState is always zero: int afState = result.get(CaptureResult.CONTROL_AF_STATE); Here is the logcat: 08-30 06:24:54.600 22842-22842/com.example.aurelio.myscanpack E/Camera2BasicFragment: Camera2BasicFragment - new instance 08-30 06:24:54.610 22842-22842/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnCreateView 08-30 06:24:54.660 22842-22842/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnViewCreated 08-30 06:24:54.670 22842-22842/com.example.aurelio.myscanpack D/SecWifiDisplayUtil: Metadata value : none 08-30 06:24:54.670 22842-22842/com.example.aurelio.myscanpack D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{a6a08dd I.E...... R.....ID 0,0-0,0} 08-30 06:24:54.720 22842-22842/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnSurfaceTextureAvailable 08-30 06:24:54.720 22842-22842/com.example.aurelio.myscanpack I/CameraManagerGlobal: Connecting to camera service 08-30 06:24:54.770 22842-22842/com.example.aurelio.myscanpack E/Camera2BasicFragment: chooseOptimalSize 08-30 06:25:40.460 22842-22842/com.example.aurelio.myscanpack D/FLashSuport: true 08-30 06:25:40.510 22842-22842/com.example.aurelio.myscanpack I/CameraManager: Using legacy camera HAL. 08-30 06:25:40.730 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnOpened - Camera 08-30 06:25:40.740 22842-24402/com.example.aurelio.myscanpack I/CameraDeviceState: Legacy camera service transitioning to state CONFIGURING 08-30 06:25:40.740 22842-26200/com.example.aurelio.myscanpack I/RequestThread-0: Configure outputs: 2 surfaces configured. 08-30 06:25:40.740 22842-26200/com.example.aurelio.myscanpack D/Camera: app passed NULL surface 08-30 06:25:40.740 22842-22842/com.example.aurelio.myscanpack D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 48 - 0, 0) vi=Rect(0, 48 - 0, 0) or=2 08-30 06:25:40.750 22842-26200/com.example.aurelio.myscanpack I/RequestThread-0: configureOutputs - set take picture size to 3264x2448 08-30 06:25:40.750 22842-22842/com.example.aurelio.myscanpack I/Choreographer: Skipped 2761 frames! The application may be doing too much work on its main thread. 08-30 06:25:40.760 22842-22842/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnSurfaceTextureSizeChanged 08-30 06:25:40.770 22842-26203/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9d930404 08-30 06:25:40.820 22842-22842/com.example.aurelio.myscanpack V/ActivityThread: updateVisibility : ActivityRecord{f5bf6f5 token=android.os.BinderProxy@dd57541 {com.example.aurelio.myscanpack/com.example.aurelio.myscanpack.OpenCvCamera}} show : false 08-30 06:25:40.830 22842-22842/com.example.aurelio.myscanpack D/CameraBridge: call checkCurrentState 08-30 06:25:40.860 22842-22842/com.example.aurelio.myscanpack I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@77bd87 time:26933623 08-30 06:25:40.880 22842-24402/com.example.aurelio.myscanpack I/CameraDeviceState: Legacy camera service transitioning to state IDLE 08-30 06:25:40.890 22842-24402/com.example.aurelio.myscanpack I/RequestQueue: Repeating capture request set. 08-30 06:25:40.890 22842-26200/com.example.aurelio.myscanpack W/LegacyRequestMapper: convertRequestMetadata - control.awbRegions setting is not supported, ignoring value 08-30 06:25:40.890 22842-26200/com.example.aurelio.myscanpack W/LegacyRequestMapper: Only received metering rectangles with weight 0. 08-30 06:25:40.890 22842-26200/com.example.aurelio.myscanpack W/LegacyRequestMapper: Only received metering rectangles with weight 0. 08-30 06:25:41.350 22842-26203/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9d93030c 08-30 06:25:41.350 22842-26203/com.example.aurelio.myscanpack I/CameraDeviceState: Legacy camera service transitioning to state CAPTURING 08-30 06:25:41.400 22842-26203/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9d93030c 08-30 06:25:41.410 22842-23555/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9fa8c62c 08-30 06:25:41.420 22842-26203/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9d93030c 08-30 06:25:41.440 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnCaptureCompleted 08-30 06:25:41.440 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: Processa Captura 08-30 06:25:41.450 22842-26203/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9d93030c 08-30 06:25:41.470 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnCaptureCompleted 08-30 06:25:41.470 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: Processa Captura 08-30 06:25:41.480 22842-23555/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9fa8c62c 08-30 06:25:41.480 22842-26203/com.example.aurelio.myscanpack D/libEGL: eglInitialize EGLDisplay = 0x9d93030c 08-30 06:25:41.500 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnCaptureCompleted 08-30 06:25:41.500 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: Processa Captura 08-30 06:25:41.520 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: OnCaptureCompleted 08-30 06:25:41.520 22842-24402/com.example.aurelio.myscanpack E/Camera2BasicFragment: Processa Captura Can you help me ?
Sorry guys, I'm not maintaining this project anymore.