Class: OpenCV::Cv::Algorithm

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)


24650
24651
24652
24653
24654
24655
24656
24657
# File 'lib/ropencv/ropencv_types.rb', line 24650

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(AlgorithmStruct)
        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



24646
24647
24648
# File 'lib/ropencv/ropencv_types.rb', line 24646

def self.null
    new(AlgorithmStruct.new)
end

Instance Method Details

#clearVoid

Note:

method wrapper for void cv::Algorithm::clear()

methods

Returns:

  • (Void)


24734
24735
24736
24737
# File 'lib/ropencv/ropencv_types.rb', line 24734

def clear()
    __validate_pointer__
    Rbind::cv_algorithm_clear( self)
end

#emptyBool

Note:

method wrapper for bool cv::Algorithm::empty()

Returns:

  • (Bool)


24758
24759
24760
24761
# File 'lib/ropencv/ropencv_types.rb', line 24758

def empty()
    __validate_pointer__
    Rbind::cv_algorithm_empty( self)
end

#get_default_nameStd::String Also known as: getDefaultName

Note:

method wrapper for const std::string cv::Algorithm::getDefaultName()

Returns:



24773
24774
24775
24776
24777
24778
24779
24780
24781
# File 'lib/ropencv/ropencv_types.rb', line 24773

def get_default_name()
    __validate_pointer__
    result = Rbind::cv_algorithm_get_default_name( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#read(fn) ⇒ Void

Note:

method wrapper for void cv::Algorithm::read(const cv::FileNode fn)

Parameters:

Returns:

  • (Void)


24751
24752
24753
24754
# File 'lib/ropencv/ropencv_types.rb', line 24751

def read(fn)
    __validate_pointer__
    Rbind::cv_algorithm_read( self, fn)
end

#save(filename) ⇒ Void

Note:

method wrapper for void cv::Algorithm::save(const std::string filename)

Parameters:

Returns:

  • (Void)


24766
24767
24768
24769
# File 'lib/ropencv/ropencv_types.rb', line 24766

def save(filename)
    __validate_pointer__
    Rbind::cv_algorithm_save( self, filename)
end

#to_sObject

converts Algorithm into a string by crawling through all its attributes



24723
24724
24725
# File 'lib/ropencv/ropencv_types.rb', line 24723

def to_s
    "#<cv::Algorithm >"
end

#write(fs, name = Std::String.new()) ⇒ Void

Note:

method wrapper for void cv::Algorithm::write(const cv::Ptrcv::FileStorage fs, const std::string name = String())

Parameters:

Returns:

  • (Void)


24743
24744
24745
24746
# File 'lib/ropencv/ropencv_types.rb', line 24743

def write(fs, name = Std::String.new())
    __validate_pointer__
    Rbind::cv_algorithm_write( self, fs, name)
end