title: Incompatible Error in OpenCV 2.4.12
body: <p>I have installed OpenCV and the detail is as follows:</p>
  <blockquote>
  <p>brew info opencv homebrew/science/opencv: stable 2.4.12 (bottled),</p>
  <p>HEAD Open source computer vision library <a href="http://opencv.org/" rel="nofollow noreferrer">http://opencv.org/</a>
  /usr/local/Cellar/opencv/2.4.12 (225 files, 36M)</p>
  </blockquote>
  <p>Then, I run the Python to import the library of cv and get the ImportError</p>
  <blockquote>
  <p>ImportError: dlopen(./cv2.so, 2): Library not loaded:
  /usr/local/lib/libpng16.16.dylib   Referenced from:
  /usr/local/Cellar/opencv/2.4.12/lib/libopencv_highgui.2.4.dylib<br />
  Reason: Incompatible library version: libopencv_highgui.2.4.dylib
  requires version 35.0.0 or later, but libpng16.16.dylib provides
  version 34.0.0</p>
  </blockquote>
  <p>I have found some related questions and follow the suggestion to reinstall the libpng to obtain the latest version. Unfortunately, it still does not work..</p>
  <p>Here is the details of libnpg:</p>
  <blockquote>
  <p>brew info libpng libpng: stable 1.6.19 (bottled), HEAD Library for
  manipulating PNG images <a href="http://www.libpng.org/pub/png/libpng.html" rel="nofollow noreferrer">http://www.libpng.org/pub/png/libpng.html</a></p>
  <p>/usr/local/Cellar/libpng/1.6.19 (17 files, 1.2M)</p>
  </blockquote>