ropencv icon indicating copy to clipboard operation
ropencv copied to clipboard

Several examples not working

Open wakiki opened this issue 9 years ago • 1 comments

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)

wakiki avatar Apr 14 '15 22:04 wakiki

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

D-Alex avatar Apr 15 '15 05:04 D-Alex