On Mac OS Maverick I have installed OpenCV with a
brew install opencv
dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib
Referenced from: /usr/local/lib/libopencv_highgui.2.4.dylib
Reason: Incompatible library version: libopencv_highgui.2.4.dylib requires version 33.0.0 or later, but libpng16.16.dylib provides version 32.0.0
Trace/BPT trap: 5
brew install libpng
Homebrew should ensure that you the correct dependencies install. However, it's possible that you have more than one version of
libpng16 installed at different paths. Have a look in...
If you find any versions of the library in these locations then they may be causing the wrong one to be loaded when your program starts. As a quick fix you can try typing
DYLD_LIBRARY_PATH=/usr/local/lib before your program name on the command line. In the longer term you may need to remove the conflicting versions altogether.