Error while installing OpenCV for Python 2.7 on OSX Yosemite - error: no matching function
<p>I was using this guide for installing OpenCV on my Mac: <a href="http://www.pyimagesearch.com/2015/06/15/install-opencv-3-0-and-python-2-7-on-osx/" rel="nofollow">http://www.pyimagesearch.com/2015/06/15/install-opencv-3-0-and-python-2-7-on-osx/</a></p>

<p>Everything worked until the last step:</p>

<pre><code>make install
</code></pre>

<p>When I got this error message:</p>

<pre><code>/Users/Nirzvi/opencv_contrib/modules/aruco/src/aruco.cpp:1629:12: error: no matching function for call to 'calibrateCamera'
return calibrateCamera(processedObjectPoints, processedImagePoints, imageSize, _cameraMatrix,
       ^~~~~~~~~~~~~~~

/Users/Nirzvi/opencv/modules/calib3d/include/opencv2/calib3d.hpp:844:21: note: candidate function not viable: requires at most 9
  arguments, but 12 were provided

CV_EXPORTS_W double calibrateCamera( InputArrayOfArrays objectPoints,
</code></pre>

<p>The install process stopped immediately and, being a beginner programmer, I have no idea what to do next.</p>

<p>If you're using <a href="http://www.pyimagesearch.com/2015/06/15/install-opencv-3-0-and-python-2-7-on-osx/" rel="nofollow">this guide</a>, make sure you remember to clone both opencv and opencv-contrib in your home folder rather than nesting them. It's easy to miss the instruction where it tells you to go back to <code>~/</code></p>

<p>As stated above, make sure you've downloaded matching versions of opencv and opencv-contrib from git.</p>

<p>Finally, make sure that your cmake command "OPENCV_EXTRA_MODULES_PATH" is pointing to the correct path for your corrected version of "opencv_contrib". If you just pull the correct version to the proper path, but don't update that value, it will keep trying to use the incorrect version of contrib.</p>

<p><strong>Note</strong>: The following is not recommended:
As an absolute last resort, you can always navigate to the cpp file it errored on (in your case: <code>/Users/Nirzvi/opencv_contrib/modules/aruco/src/aruco.cpp</code>), and comment out the "calibrateCamera" call and its surrounding function. You won't be able to make use of whatever that function was, but opencv has a ton of functions, if it's not one you need for your project, commenting out the function will at least get you further in your install process.</p>

python osx python-2.7 opencv install