How to Capture Camera frames with hidden/Dummy Surfaceview in Android
Is there way i can create own NativeCameraView in Android Background Service and add this view to WindowManager in order to capture camera frames in Background. In Android we can create dummy SurfaceView and then adding it to WindowManager can create surface which in turn start video capture or camera preview but onPreviewFrame never gets called therefore i am wondering can we do similar thing using OpenCV since it has callback onCameraFrame.??
Any suggestion Appreciated
Could you solve the problem at last? I have the same problem. Could you help me? Thanks
Hi CGN, could you solve the problem? And can you help me? Thanks
Hi telopena. I could solve the problem. I call directly to NativeCameraView.connectCamera, with screen dimensions as parameters (you have to change connectCamera and disconnectCamera privacy). I also have to modify the CameraBridgeViewBase.calculateCameraFrameSize class, to avoid it crash because size is 0. For that I write: maxAllowedWidth=surfaceWidth; maxAllowedHeight=surfaceHeight;
That's all, and it works for me.
Hi CGN, Could you please discuss about your changes made to NativeCameraView and how are you using those changes made in the application ? Thanks a lot