Class: OpenCV::Cv::Algorithm
- Inherits:
-
Object
- Object
- OpenCV::Cv::Algorithm
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
-
#clear ⇒ Void
methods.
- #empty ⇒ Bool
- #get_default_name ⇒ Std::String (also: #getDefaultName)
- #read(fn) ⇒ Void
- #save(filename) ⇒ Void
-
#to_s ⇒ Object
converts Algorithm into a string by crawling through all its attributes.
- #write(fs, name = Std::String.new()) ⇒ Void
Class Method Details
.new(*args) ⇒ Object
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 |
.null ⇒ Object
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
#clear ⇒ Void
Note:
method wrapper for void cv::Algorithm::clear()
methods
24734 24735 24736 24737 |
# File 'lib/ropencv/ropencv_types.rb', line 24734 def clear() __validate_pointer__ Rbind::cv_algorithm_clear( self) end |
#empty ⇒ Bool
Note:
method wrapper for bool cv::Algorithm::empty()
24758 24759 24760 24761 |
# File 'lib/ropencv/ropencv_types.rb', line 24758 def empty() __validate_pointer__ Rbind::cv_algorithm_empty( self) end |
#get_default_name ⇒ Std::String Also known as: getDefaultName
Note:
method wrapper for const std::string cv::Algorithm::getDefaultName()
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)
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)
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_s ⇒ Object
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())
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 |