Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Created November 23, 2012 02:28
Show Gist options
  • Save kjunichi/4133764 to your computer and use it in GitHub Desktop.
Save kjunichi/4133764 to your computer and use it in GitHub Desktop.
brew upgrade opencv
==> Upgrading opencv
Unsatisfied dependency: numpy
Homebrew does not provide Python dependencies; install with:
pip install numpy
brew remove opencv
/usr/local/share/python/pip install numpy
brew install tbb
brew install qt
brew install opencv --with-qt --with-tbb
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
>>> import cv2
>>> help(cv2)
>>> cap= cv2.CaptureFromCAM(0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'CaptureFromCAM'
>>> cap= cv2.cv.CaptureFromCAM(0)
>>> img = cv2.cv.QueryFrame(cap)
>>> cv2.cv.SaveImage("hoge.png",img)
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> quit()
Cleaned up camera.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment