OpenFTC / EasyOpenCV

Finally, a straightforward and easy way to use OpenCV on an FTC robot!
216 stars 99 forks source link

Opencv internal camera can't instantiated #4

Closed ftc10015 closed 4 years ago

ftc10015 commented 4 years ago

image

Windwoes commented 4 years ago

You're using EasyOpenCV 1.3 or higher, but still using sample code from <= 1.2.

1.3 had an API change which changes how cameras are instantiated.

ftc10015 commented 4 years ago

Thanks FROGbots, I changed to 1.2

Windwoes commented 4 years ago

That's a valid solution, although you lose access to the new features provided by 1.3..... all you need to do is change it to be:

phoneCam = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId);
NoahAndrews commented 4 years ago

In the future we should avoid having breaking changes in minor version updates.