Class: Cv::MatSize

Inherits:
Object
  • Object
show all
Defined in:
lib/opencv-ruby/core/mat_size.rb

Instance Method Summary collapse

Instance Method Details

#to_aObject



3
4
5
6
7
# File 'lib/opencv-ruby/core/mat_size.rb', line 3

def to_a
  self.dims.times.reduce(Array.new) do |array, i|
    array << self[i]
  end
end

#to_sObject



9
10
11
# File 'lib/opencv-ruby/core/mat_size.rb', line 9

def to_s
  "<#{self.class.name}:[#{self.to_a.join(",")}]>"
end