O'Reilly logo

Android Application Programming with OpenCV 3 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 the filters to CameraActivity

We will let the user have up to one channel mixing filter, one curve filter, and one convolution filter active at any time. For each filter category, we will provide a menu button that lets the user cycle through the available filters or no filter.

Let's start editing the relevant resource files to define the menu buttons and their text. We should add the following strings to res/values/strings.xml:

<string name="menu_next_curve_filter">Next Curve</string>
<string name="menu_next_mixer_filter">Next Mixer</string>
<string name="menu_next_convolution_filter">Next Kernel</string>

Then, we should edit res/menu/activity_camera.xml as follows:

<menu xmlns:android="http://schemas.android.com/apk/res/android">
  <item
    

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