Closed the911s closed 9 years ago
Several of the constructors for Mat are missing.
For example, an important prototype used for cropping images is Mat::Mat(const Mat& m, const Rect& roi), which yields the error:
Mat::Mat(const Mat& m, const Rect& roi)
[8] pry(main)> mat_crop = OpenCV::Cv::Mat.new(mat, rect) ArgumentError: no constructor for OpenCV::Cv::Mat([#<OpenCV::Cv::Mat:0x007fd9a620edb0 @__obj_ptr__=#<OpenCV::Cv::MatStruct:0x007fd9a620e9a0>>, #<OpenCV::Cv::Rect:0x007fd9a613cdd8 @__obj_ptr__=#<OpenCV::Cv::RectStruct:0x007fd9a613ccc0>>])
Attempting to construct a Mat using the prototype Mat::Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all() ) yields
Mat::Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all() )
[13] pry(main)> mat_crop = OpenCV::Cv::Mat.new(mat, row_range, col_range) ArgumentError: no constructor for OpenCV::Cv::Mat([#<OpenCV::Cv::Mat:0x007fd9a620edb0 @__obj_ptr__=#<OpenCV::Cv::MatStruct:0x007fd9a620e9a0>>, #<OpenCV::Cv::Range:0x007fd9a51eeae8 @__obj_ptr__=#<OpenCV::Cv::RangeStruct:0x007fd9a51ee098>>, #<OpenCV::Cv::Range:0x007fd9a4e2c298 @__obj_ptr__=#<OpenCV::Cv::RangeStruct:0x007fd9a4e276a8>>])
Added additional constructors and updated gem. Thx for reporting
Thank you!
Several of the constructors for Mat are missing.
For example, an important prototype used for cropping images is
Mat::Mat(const Mat& m, const Rect& roi)
, which yields the error:Attempting to construct a Mat using the prototype
Mat::Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all() )
yields