D-Alex / ropencv

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

Accessing shape off Mat #34

Closed anthonator closed 9 years ago

anthonator commented 9 years ago

How do you access the shape off of an image?

image = OpenCV.cv.imread('/to/my/file.png')
puts image.shape

The above throws:

undefined method `shape' for #<OpenCV::Cv::Mat:0x007fc4f6c082e0>
anthonator commented 9 years ago

Looks like size is how you get the shape.