Letters from a Maladroit

Wolfenstein 3D AI - Part 5: OpenCV SIFT test

One of my worries is that SIFT may not work as well on Wolfenstein 3D. The resolution is only 640 x 480 at best and there aren’t many colors used. The floor and ceiling and solid shades of gray - the reason for this is described in the awesomely great book “Masters of Doom” by David Kushner. To test, the viability of SIFT, I ran the OpenCV implementation of SIFT against some sample screenshots from the game.

One thing to note is that SIFT is patented in the U.S. This means that the Ubuntu build of OpenCV does not include SIFT and SURF implementations - ie. sudo apt-get install libopencv-dev. This change was made in OpenCV 2.4+. The algorithms can still be used, but they have been moved to a separate module named nonfree and must be built with the appropriate CMAKE parameters.

I ended up reinstalling OpenCV with this shell script: https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_8.sh

For the test, the following sample programs were used:

Fig. 1 - Results of Simple matcher program

Simple Matcher Matcher 1

Fig. 2 - Results of Descriptor Extractor Matcher program with two doors

Descriptor Extractor Matcher 1

Fig. 3 - Results of Descriptor Extractor Matcher program with two doors and one partially occluded

Descriptor Extractor Matcher 2

Fig. 4 - Results of Descriptor Extractor Matcher program with no doors

Descriptor Extractor Matcher 3