I'm using ubuntu 18.04 and needed to install opencv 2.4 (to use the patented features that are not available in newer versions e.g SIFT, SURF). But whenever I install any version whether it's 2.4, 3.2 or even 3.4 and check for the version using python cv2.__version__
it outputs '3.2.0'
and hence, can't use the patented functions.
So, is there a way of using the installed version 2.4 instead of 3.2, or do I need to uninstall and reinstall? I installed it by following this answer https://stackoverflow.com/a/18590112
EDIT
I didn't uninstall the previous version properly. The correct way to uninstall is
$ cd ~/opencv/build
$ sudo make uninstall
then delete the opencv folder