Class: OpenCV::CvStatModel

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ropencv/ropencv_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


41661
41662
41663
41664
41665
41666
41667
41668
# File 'lib/ropencv/ropencv_types.rb', line 41661

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(CvStatModelStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



41657
41658
41659
# File 'lib/ropencv/ropencv_types.rb', line 41657

def self.null
    new(CvStatModelStruct.new)
end

Instance Method Details

#load(filename, name = 0) ⇒ Void

Note:

method wrapper for void CvStatModel::load(c_string filename, c_string name = 0)

Parameters:

  • filename (C_string)
  • name (C_string) (defaults to: 0)

Returns:

  • (Void)


41756
41757
41758
41759
# File 'lib/ropencv/ropencv_types.rb', line 41756

def load(filename, name = 0)
    __validate_pointer__
    Rbind::cv_stat_model_load( self, filename, name)
end

#save(filename, name = 0) ⇒ Void

Note:

method wrapper for void CvStatModel::save(c_string filename, c_string name = 0)

methods

Parameters:

  • filename (C_string)
  • name (C_string) (defaults to: 0)

Returns:

  • (Void)


41747
41748
41749
41750
# File 'lib/ropencv/ropencv_types.rb', line 41747

def save(filename, name = 0)
    __validate_pointer__
    Rbind::cv_stat_model_save( self, filename, name)
end

#to_sObject

converts CvStatModel into a string by crawling through all its attributes



41734
41735
41736
# File 'lib/ropencv/ropencv_types.rb', line 41734

def to_s
    "#<CvStatModel >"
end