user1755546
user1755546

Reputation: 1049

Initialization CameraBridgeViewBase from service

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

Answers (2)

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

user2982332
user2982332

Reputation:

CameraBridgeViewBase extends from Android class Camera. If you dont initialize camera from Service, you too cant initialize CameraBridgeViewBase from Service

Upvotes: 1

Related Questions