For this chapter, we need to add one new class, com.nummist.secondsight.filters.ar.ImageDetectionFilter
. We also need to add some resource files, the images that we want to track. Download the images from http://nummist.com/opencv/5206_04_images.zip, unzip them, and put them in the project's res/drawable-nodpi
folder.
These images are famous paintings by a 19th-century Dutch artist named Vincent van Gogh (http://en.wikipedia.org/wiki/Vincent_van_Gogh) and a 16th-century Indian artist named Basawan (http://en.wikipedia.org/wiki/Basawan). Our tracker will work well with these images because they contain many high-contrast details, without much repetition of patterns. Thus, there is something distinctive to track in most parts of each image. For example, here is one of Basawan's paintings, Akbar Hunting with Cheetahs:
Here is one of Vincent van Gogh's paintings, The Starry Night: