Reputation: 1049
In Activity initialization CameraBridgeViewBase do next:
private CameraBridgeViewBase mOpenCvCameraView;
@Override
public void onCreate() {
...
mOpenCvCameraView = (CameraBridgeViewBase)findViewById(R.id.SurfaceView01);
...
}
how to initialize it of Service? In the application there is no Activity.
Upvotes: 0
Views: 291
Reputation: 751
All you need to capture frames is camera. You don't need any of CameraBridgeViewBase subclasses in your service. These are convenience classes used to speed up development of image processing apps with preview.
You can use implementation of JavaCameraView as a reference (https://searchcode.com/codesearch/view/26664456/).
Upvotes: 1
Reputation:
CameraBridgeViewBase extends from Android class Camera. If you dont initialize camera from Service, you too cant initialize CameraBridgeViewBase from Service
Upvotes: 1