我想知道如何将 cvCanny 与 ruby-opencv 一起使用。我找不到任何合适的文档。这就是我必须要做的……</p>
require "rubygems"
require "opencv"
include OpenCV
original_window = GUI::Window.new "original"
hough_window = GUI::Window.new "hough circles"
image = IplImage::load "stuff.jpg"
gray = image.canny(0.3, 0.8)
hough_window.show gray
GUI::wait_key
错误:
$ ruby houghcircle.rb
houghcircle.rb:11:in `canny': /Users/someuser/Development/Workspaces/2012/Libs/OpenCV-2.4.3/modules/imgproc/src/canny.cpp:282: error: (-215) src.size == dst.size && src.depth() == CV_8U && dst.type() == CV_8U in function cvCanny (OpenCV::CvStsAssert)
from houghcircle.rb:11