D-Alex / ropencv

ffi ruby wrapper for opencv
Other
67 stars 14 forks source link

Several examples not working #32

Open wakiki opened 9 years ago

wakiki commented 9 years ago

Thanks for fixing the gem installation.

I've now installed the gem and am getting the following errors when running the examples. Not sure what I'm doing wrong?

Steve

ruby-2.1.4@ropencv [Steve@SiMac5K] examples $ ruby match_keypoints.rb /Users/Steve/.rvm/gems/ruby-2.1.4@ropencv/gems/ropencv-0.0.21/lib/ropencv/ropencv_types.rb:22499:in create': wrong number of arguments (0 for 1) (ArgumentError) from match_keypoints.rb:13:in

'

ruby-2.1.4@ropencv [Steve@SiMac5K] examples $ ruby video2images.rb /Users/Steve/.rvm/gems/ruby-2.1.4@ropencv/gems/ropencv-0.0.21/lib/ropencv/ropencv_types.rb:29642:in new': no constructor for OpenCV::Cv::VideoCapture([nil]) (ArgumentError) from video2images.rb:6:in

'

ruby-2.1.4@ropencv [Steve@SiMac5K] examples $ ruby hough_circles.rb hough_circles.rb:9:in `

': uninitialized constant OpenCV::Cv::HOUGH_GRADIENT (NameError)

D-Alex commented 9 years ago

Yes, some of them are not working because they were written for a different opencv version (opencv 3.0). And I was a bit lazy adding a check at the top. You should check the documentation of your current opencv version. ropencv is simply wrapping everything with the same method signature.

http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html#videowriter-videowriter

Alex