Facial detection using OpenCV & Python on Windows7-Cygwin64


Finally! As described in my previous post, I had some struggle getting OpenCV to run at all under my Windows7 / Cygwin64 installation, but eventually I managed getting it working for C++.

However, Python still refused to cooperate with OpenCV, because it couldnt find the cv2 module, despite the fact that I had placed the cv2.pyd file under my Python site-packages library.

This morning I got a hint from Yaakov what the problem might be, basically that the cv.pyd (which fundamentally is a dll) coming with the OpenCV distribution is for Windows Python, not Cygwin Python. That made me look into the OpenCV build I had built from sources… and imagine, there was a file cv2.dll….! Hmm, what happens if I copy that file to my Python site-packages dir…?

All of sudden Python works beautifully with OpenCV!

To test my installation, I used the Python code from Fideloper’s site


About swdevperestroika

High tech industry veteran, avid hacker reluctantly transformed to mgmt consultant.
This entry was posted in development, software and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s