The cv method is not defined in Mat. When I run my app specs, I don't see this issue, but when I run in development mode, I'm getting the error.
I'm doing my best to troubleshoot, but running into walls. From my understanding, the Mat class does not have access to the cv method defined in the grandparent module unless Mat includes the grandparent module, so the error seems reasonable.
As an example:
module A
def a; :a; end
class B
def b; a; end
end
end
A::B.new().b will fail unless B includes A.
Why this works in my specs is beyond me. Any ideas?
Would you be open to changing references to cv::Mat to self, or more explicitly, OpenCV::Cv::Mat in the above code. I can put together a pull request if you like.
Yes, you are absolutely right "cv" should never be called from the scope of OpenCV
I pushed a fix to master but please feel welcome to submit any further improvements or fixes.
I'm getting this error in
ropencv_ruby.rb
line 326. Here is an exert from the from the code (within theMat
class):The cv method is not defined in Mat. When I run my app specs, I don't see this issue, but when I run in development mode, I'm getting the error.
I'm doing my best to troubleshoot, but running into walls. From my understanding, the
Mat
class does not have access to the cv method defined in the grandparent module unlessMat
includes the grandparent module, so the error seems reasonable.As an example:
A::B.new().b
will fail unless B includes A.Why this works in my specs is beyond me. Any ideas?
Would you be open to changing references to
cv::Mat
toself
, or more explicitly,OpenCV::Cv::Mat
in the above code. I can put together a pull request if you like.