Installing OpenCV on Mac
I used the instructions for installing OpenCV on Mac here:
http://www.jeffreythompson.org/blog/2013/08/22/update-installing-opencv-on-mac-mountain-lion/
With some additional changes, because otherwise I kept loosing my PYTHONPATH
so I had to add this line in bash profile:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
vi ~/.bash_profile
http://www.jeffreythompson.org/blog/2013/08/22/update-installing-opencv-on-mac-mountain-lion/
With some additional changes, because otherwise I kept loosing my PYTHONPATH
so I had to add this line in bash profile:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
vi ~/.bash_profile
Template Matching
I followed the tutorial here and got the results below
http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_template_matching/py_template_matching.html
http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_template_matching/py_template_matching.html
I used the image below to match in the image above
And this is what I got as a result
Here is the code:
template_matching.py |