Android Surface View Stops Updating [closed]

asked 2012-08-14 09:37:55 -0600

Jeffeb3 gravatar image

updated 2012-08-15 15:46:17 -0600

First off, my phone doesn't support the native camera, so I'm using the 2.4.0 tutorial-1(Add OpenCV) as an example.

I have built an activity with some ProgressBars, some TextViews, and a surface view with the captured image. The Progess bars and TextViews update fine, but the SurfaceView will stop updating. It won't start again until I open another activity and go back to my activity.

I don't know where to look for the problem, so I'm looking for debugging tips, or requests for more information.

LogCat Info: In the beginning, things are working just fine. The surfaceView is created, normally. The frames are being processed. Then the surface gets created again, for some reason.

I/Sample1View.java( 2574): processFrame
I/Sample::SurfaceView( 2574): In While Loop (SampleViewBase::Run)
I/Sample::SurfaceView( 2574): surfaceCreated

Then there are some error messages from the camera?

D/RPC     (  220): 3000008c:00050000 received CALL.
D/RPC     (  220): 3000008c:00050000 dispatching RPC call (XID 290, xdr 0x11e0a68) for callback client 3100008c:00050001.
D/RPC     (  220): 3100008c:327681 sending RPC reply (XID 290)
I/QualcommCameraHardwareZSL(  125): request capture mode normal
I/QualcommCameraHardwareZSL(  125): requested preview size 640 x 480
I/QualcommCameraHardwareZSL(  125): requested picture size 640 x 480, mCaptureMode 0
I/QualcommCameraHardwareZSL(  125): requested jpeg thumbnail size 512 x 384
I/QualcommCameraHardwareZSL(  125): requested jpeg quality 85
D/QualcommCameraHardwareZSL(  125): flip-video = 0
D/QualcommCameraHardwareZSL(  125):  setZoom pre_value 0 value 0
I/QualcommCameraHardwareZSL(  125): Set zoom=0 40
I/QualcommCameraHardwareZSL(  125): request burst picture count 1
D/QualcommCameraHardwareZSL(  125):  setSharpness pre_value 10 value 10
D/QualcommCameraHardwareZSL(  125): initDefaultParameters   AfArea : (0,0,0,0,0)
D/QualcommCameraHardwareZSL(  125): initDefaultParameters   AecArea : (0,0,0,0,0)
D/QualcommCameraHardwareZSL(  125): setAecLock pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125): setAwbLock pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125): setAntibanding pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125):  setSceneMode pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125): requested video size 640 x 480
D/QualcommCameraHardwareZSL(  125): virtual bool android::QualcommCameraHardware::recordingEnabled() recordingState=0
I/QualcommCameraHardwareZSL(  125): setRecordingHint value 0 actual-camera-mode 0 cam-mode -1  recordingEnabled 0
I/QualcommCameraHardwareZSL(  125): requested Fps Range min: 1 x max: 200000
D/mm-camera(  125): config_proc_CAMERA_SET_PARM_FPS: 18
D/QualcommCameraHardwareZSL(  125):  setAutoExposure pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125):  setExposureCompensation pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125):  setISOValue pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125):  setSaturation pre_value 5 value 5
I/QualcommCameraHardwareZSL(  125): requested effect 0
D/QualcommCameraHardwareZSL(  125): setEffect mColorEffectState 0
D/QualcommCameraHardwareZSL(  125):  setEffect pre_value 0 value 0
D/QualcommCameraHardwareZSL(  125):  setWhiteBalance pre_value 1 value 1
D/QualcommCameraHardwareZSL(  125): pre_mColorEffectState value = 0 mColorEffectState 0
D/QualcommCameraHardwareZSL(  125):  setContrast pre_value 5 value 5
I/QualcommCameraHardwareZSL(  125): Setting flash 0
D/        (  125): [GECameraParameters::getGPUEffect] enter
D/        (  125): [GECameraParameters::getGPUEffect] leave. no key GPU-effect
D/        (  125): [GECameraParameters::getGPUEffectParam] leave. no key GE-param0
D/        (  125): [GECameraParameters::getGPUEffectParam] leave. no key GE-param1
I/GPUPostEffect(  125): int mlabs::GPUPostEffect::setParameters(mlabs::GPUPostEffect::GPUTask*): old effect = -1, new effect = -1.
D/GPUPostEffect(  125): setParameters: isGEInit == false: no call to ChooseEffect ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-27 10:18:13.021272

Comments

Did the logcat from android give any tip / error message regarding that issue?

Rui Marques gravatar imageRui Marques ( 2012-08-14 10:56:58 -0600 )edit

Good point. It's a little hard to do, because I can't figure out exactly when in the logs it stops drawing the surface, but there is something suspicious, I'll add it to the question.

Jeffeb3 gravatar imageJeffeb3 ( 2012-08-15 15:33:13 -0600 )edit

Debugging that is a bit out of my scope but it seems more of an Android problem and not opencv. Did the tutorial without any modifications made by you, worked ok?

Rui Marques gravatar imageRui Marques ( 2012-08-16 04:03:21 -0600 )edit