Skip to content

Instantly share code, notes, and snippets.

@agarie
Created February 11, 2013 07:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save agarie/4753170 to your computer and use it in GitHub Desktop.
Save agarie/4753170 to your computer and use it in GitHub Desktop.
Installing ruby-opencv on OS X.
# Use Homebrew and be happy.
brew update
brew install opencv
# Give the correct pathnames. Of course, `2.4.3` is the current version at this time, change it accordingly.
gem install ruby-opencv -- --with-opencv-lib=/usr/local/Cellar/opencv/2.4.3/lib \
--with-opencv-include=/usr/local/Cellar/opencv/2.4.3/include/opencv \
--with-opencv-include=/usr/local/Cellar/opencv/2.4.3/include/opencv2
@BrianOn99
Copy link

BrianOn99 commented Feb 8, 2018

homebrew opencv now defaults to opencv2. For those visiting here, the following works at the time of writing:

brew install opencv@2
gem install ruby-opencv -- --with-opencv-lib=/usr/local/Cellar/opencv@2/2.4.13.5/lib \
                                             --with-opencv-include=/usr/local/Cellar/opencv@2/2.4.13.5/include/

@Lasvad
Copy link

Lasvad commented Apr 10, 2019

There seems to be issuing installing the ruby-opencv with ruby 2.6.2. Installing on 2.5.3 seemed to work fine. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment