Class: OpenCV::Std::Vector::Std_Vector_Cv_KeyPoint
- Inherits:
-
Object
- Object
- OpenCV::Std::Vector::Std_Vector_Cv_KeyPoint
- Extended by:
- FFI::DataConverter
- Includes:
- Enumerable
- 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
- #<<(val) ⇒ Object
- #[](idx) ⇒ Std::Vector::Cv_KeyPoint
- #at(size) ⇒ Std::Vector::Cv_KeyPoint
- #back ⇒ Std::Vector::Cv_KeyPoint
- #capacity ⇒ Size_T
- #clear ⇒ Void
- #data ⇒ Void
- #delete_if(&block) ⇒ Object
- #each(&block) ⇒ Object
- #empty ⇒ Bool
- #front ⇒ Std::Vector::Cv_KeyPoint
- #get_element ⇒ Std::Vector::Cv_KeyPoint
- #pop_back ⇒ Void
- #push_back(other) ⇒ Void
- #reserve(size) ⇒ Void
-
#resize(size, val = Std::Vector::Cv_KeyPoint.new()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Std_Vector_Cv_KeyPoint into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
83682 83683 83684 83685 83686 83687 83688 83689 83690 83691 83692 83693 83694 83695 83696 83697 83698 83699 83700 83701 83702 83703 83704 83705 83706 83707 83708 83709 83710 83711 83712 83713 83714 83715 83716 |
# File 'lib/ropencv/ropencv_types.rb', line 83682 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Vector::Std_Vector_Cv_KeyPointStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # overloaded method wrapper for std::vector<std::vector<cv::KeyPoint>>::vector<std::vector<cv::KeyPoint>>() @@std_vector_std_vector_cv_key_point_vector_std_vector_cv_key_point_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@std_vector_std_vector_cv_key_point_vector_std_vector_cv_key_point_defaults0[i] end begin return Rbind::std_vector_std_vector_cv_key_point_vector_std_vector_cv_key_point(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<std::vector<cv::KeyPoint>>::vector<std::vector<cv::KeyPoint>>(std::vector<std::vector<cv::KeyPoint>> other) @@std_vector_std_vector_cv_key_point_vector_std_vector_cv_key_point__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@std_vector_std_vector_cv_key_point_vector_std_vector_cv_key_point__2_defaults1[i] end begin return Rbind::std_vector_std_vector_cv_key_point_vector_std_vector_cv_key_point__2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
83943 83944 83945 83946 |
# File 'lib/ropencv/ropencv_types.rb', line 83943 def <<(val) push_back(val) self end |
#[](idx) ⇒ Std::Vector::Cv_KeyPoint
method wrapper for std::vectorcv::KeyPoint std::vectorstd::vector<cv::KeyPoint>::operator
83839 83840 83841 83842 83843 83844 83845 83846 83847 83848 |
# File 'lib/ropencv/ropencv_types.rb', line 83839 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_std_vector_cv_key_point_operator_array( self, size) 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 |
#at(size) ⇒ Std::Vector::Cv_KeyPoint
method wrapper for std::vectorcv::KeyPoint std::vectorstd::vector<cv::KeyPoint>::at(size_t size)
83853 83854 83855 83856 83857 83858 83859 83860 83861 83862 |
# File 'lib/ropencv/ropencv_types.rb', line 83853 def at(size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_std_vector_cv_key_point_at( self, size) 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 |
#back ⇒ Std::Vector::Cv_KeyPoint
method wrapper for std::vectorcv::KeyPoint std::vectorstd::vector<cv::KeyPoint>::back()
83878 83879 83880 83881 83882 83883 83884 83885 83886 |
# File 'lib/ropencv/ropencv_types.rb', line 83878 def back() __validate_pointer__ result = Rbind::std_vector_std_vector_cv_key_point_back( 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 |
#capacity ⇒ Size_T
method wrapper for size_t std::vectorstd::vector<cv::KeyPoint>::capacity()
83816 83817 83818 83819 |
# File 'lib/ropencv/ropencv_types.rb', line 83816 def capacity() __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vectorstd::vector<cv::KeyPoint>::clear()
83809 83810 83811 83812 |
# File 'lib/ropencv/ropencv_types.rb', line 83809 def clear() __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vectorstd::vector<cv::KeyPoint>::data()
83890 83891 83892 83893 |
# File 'lib/ropencv/ropencv_types.rb', line 83890 def data() __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_data( self) end |
#delete_if(&block) ⇒ Object
83947 83948 83949 83950 83951 83952 83953 83954 |
# File 'lib/ropencv/ropencv_types.rb', line 83947 def delete_if(&block) v = self.class.new each do |i| v << i if !yield(i) end v.swap(self) self end |
#each(&block) ⇒ Object
83933 83934 83935 83936 83937 83938 83939 83940 83941 83942 |
# File 'lib/ropencv/ropencv_types.rb', line 83933 def each(&block) if block s = size 0.upto(s-1) do |i| yield self[i] end else Enumerator.new(self) end end |
#empty ⇒ Bool
method wrapper for bool std::vectorstd::vector<cv::KeyPoint>::empty()
83823 83824 83825 83826 |
# File 'lib/ropencv/ropencv_types.rb', line 83823 def empty() __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_empty( self) end |
#front ⇒ Std::Vector::Cv_KeyPoint
method wrapper for std::vectorcv::KeyPoint std::vectorstd::vector<cv::KeyPoint>::front()
83866 83867 83868 83869 83870 83871 83872 83873 83874 |
# File 'lib/ropencv/ropencv_types.rb', line 83866 def front() __validate_pointer__ result = Rbind::std_vector_std_vector_cv_key_point_front( 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 |
#get_element ⇒ Std::Vector::Cv_KeyPoint
method wrapper for std::vectorcv::KeyPoint std::vectorstd::vector<cv::KeyPoint>::operator
83922 83923 83924 83925 83926 83927 83928 83929 83930 83931 |
# File 'lib/ropencv/ropencv_types.rb', line 83922 def [](size) validate_index(size) __validate_pointer__ result = Rbind::std_vector_std_vector_cv_key_point_operator_array( self, size) 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 |
#pop_back ⇒ Void
method wrapper for void std::vectorstd::vector<cv::KeyPoint>::pop_back()
83905 83906 83907 83908 |
# File 'lib/ropencv/ropencv_types.rb', line 83905 def pop_back() __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::KeyPoint>::push_back(std::vectorcv::KeyPoint other)
83898 83899 83900 83901 |
# File 'lib/ropencv/ropencv_types.rb', line 83898 def push_back(other) __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::KeyPoint>::reserve(size_t size)
83831 83832 83833 83834 |
# File 'lib/ropencv/ropencv_types.rb', line 83831 def reserve(size) __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_reserve( self, size) end |
#resize(size, val = Std::Vector::Cv_KeyPoint.new()) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::KeyPoint>::resize(size_t size, std::vectorcv::KeyPoint val = std::vectorcv::KeyPoint())
methods
83795 83796 83797 83798 |
# File 'lib/ropencv/ropencv_types.rb', line 83795 def resize(size, val = Std::Vector::Cv_KeyPoint.new()) __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vectorstd::vector<cv::KeyPoint>::size()
83802 83803 83804 83805 |
# File 'lib/ropencv/ropencv_types.rb', line 83802 def size() __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vectorstd::vector<cv::KeyPoint>::swap(std::vectorstd::vector<cv::KeyPoint> other)
83913 83914 83915 83916 |
# File 'lib/ropencv/ropencv_types.rb', line 83913 def swap(other) __validate_pointer__ Rbind::std_vector_std_vector_cv_key_point_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Std_Vector_Cv_KeyPoint into a string by crawling through all its attributes
83782 83783 83784 |
# File 'lib/ropencv/ropencv_types.rb', line 83782 def to_s "#<std::vector<std::vector<cv::KeyPoint>> >" end |
#validate_index(idx) ⇒ Object
83928 83929 83930 83931 83932 |
# File 'lib/ropencv/ropencv_types.rb', line 83928 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |