O'Reilly logo

Android Application Programming with OpenCV by Joseph Howse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding 3D tracking and rendering to CameraActivity

We need to make a few changes to CameraActivity to conform with our changes to ImageDetectionFilter and with the new interface provided by ARFilter. We also need to modify the activity's layout so that it includes a GLSurfaceView. The adapter for this GLSurfaceView will be ARCubeRenderer. The ImageDetectionFilter and the ARCubeRenderer methods will use CameraProjectionAdapter to coordinate their projection matrices.

First, let's make the following changes to the member variables of CameraActivity:

  // The filters.
  private ARFilter[] mImageDetectionFilters; private Filter[] mCurveFilters; private Filter[] mMixerFilters; private Filter[] mConvolutionFilters; // ... // The camera view. private CameraBridgeViewBase ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required