Help us understand the problem. What is going on with this article?

さんじゃらっと OSX + ruby でOpenCV

More than 5 years have passed since last update.

OSX + ruby でOpenCVを使ってみます。
ruby-opencvを使います

OpenCV のインストール

brew search opencv
brew tap homebrew/science
brew info opencv
brew install opencv

gemのインストール

gem install ruby-opencv

サンプルプログラム

show.rb
require 'opencv'
include OpenCV

if ARGV.size == 0
  puts "Usage: ruby #{__FILE__} ImageToLoadAndDisplay"
  exit
end

image = nil
begin
  image = CvMat.load(ARGV[0], CV_LOAD_IMAGE_COLOR) # Read the file.
rescue
  puts 'Could not open or find the image.'
  exit
end

window = GUI::Window.new('Display window') # Create a window for display.
window.show(image) # Show our image inside it.
GUI::wait_key # Wait for a keystroke in the window.

ほんで
ruby show.rb ***.jpg
とかやると、ただ画像が表示されるだけですが動作します

araya
渋谷で開発企業を経営しています。 エンジニア募集中です。 http://arkth.co.jp
arkth
AI,IoT,WEBシステムの開発を行っています
https://arkth.co.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした