Class: OpenCV::CvMat

Inherits:
Object
  • Object
show all
Defined in:
lib/hornetseye-opencv/cvmat.rb

Instance Method Summary collapse

Instance Method Details

#orig_to_multiarrayObject


20
# File 'lib/hornetseye-opencv/cvmat.rb', line 20

alias_method :orig_to_multiarray, :to_multiarray

#to_multiarrayObject


22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/hornetseye-opencv/cvmat.rb', line 22

def to_multiarray
  retval = orig_to_multiarray
  case channel
  when 1
    retval.roll[ 0 ]
  when 2
    Hornetseye::MultiArray.import Hornetseye::COMPLEX(retval.typecode), retval.memory, width, height
  when 3
    Hornetseye::MultiArray.import Hornetseye::RGB(retval.typecode), retval.memory, width, height
  else
    retval
  end
end