Class: OpenCV::Std::Vector::Cv_KeyPoint
- Inherits:
-
Object
- Object
- OpenCV::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) ⇒ Cv::KeyPoint
- #at(size) ⇒ Cv::KeyPoint
- #back ⇒ Cv::KeyPoint
- #capacity ⇒ Size_T
- #clear ⇒ Void
- #data ⇒ Void
- #delete_if(&block) ⇒ Object
- #each(&block) ⇒ Object
- #empty ⇒ Bool
- #front ⇒ Cv::KeyPoint
- #get_element ⇒ Cv::KeyPoint
- #pop_back ⇒ Void
- #push_back(other) ⇒ Void
- #reserve(size) ⇒ Void
-
#resize(size, val = Cv::KeyPoint.new()) ⇒ Void
methods.
- #size ⇒ Size_T
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Vector::Cv_KeyPoint into a string by crawling through all its attributes.
- #validate_index(idx) ⇒ Object
Class Method Details
.vector ⇒ Object .vector ⇒ Object
35715 35716 35717 35718 35719 35720 35721 35722 35723 35724 35725 35726 35727 35728 35729 35730 35731 35732 35733 35734 35735 35736 35737 35738 35739 35740 35741 35742 35743 35744 35745 35746 35747 35748 35749 |
# File 'lib/ropencv/ropencv_types.rb', line 35715 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(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<cv::KeyPoint>::vector<cv::KeyPoint>() @@std_vector_cv_key_point_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_cv_key_point_vector_cv_key_point_defaults0[i] end begin return Rbind::std_vector_cv_key_point_vector_cv_key_point(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for std::vector<cv::KeyPoint>::vector<cv::KeyPoint>(std::vector<cv::KeyPoint> other) @@std_vector_cv_key_point_vector_cv_key_point2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@std_vector_cv_key_point_vector_cv_key_point2_defaults1[i] end begin return Rbind::std_vector_cv_key_point_vector_cv_key_point2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
Instance Method Details
#<<(val) ⇒ Object
35976 35977 35978 35979 |
# File 'lib/ropencv/ropencv_types.rb', line 35976 def <<(val) push_back(val) self end |
#[](idx) ⇒ Cv::KeyPoint
method wrapper for cv::KeyPoint std::vectorcv::KeyPoint::operator
35872 35873 35874 35875 35876 35877 35878 35879 35880 35881 |
# File 'lib/ropencv/ropencv_types.rb', line 35872 def [](size) validate_index(size) __validate_pointer__ result = Rbind::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) ⇒ Cv::KeyPoint
method wrapper for cv::KeyPoint std::vectorcv::KeyPoint::at(size_t size)
35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 |
# File 'lib/ropencv/ropencv_types.rb', line 35886 def at(size) validate_index(size) __validate_pointer__ result = Rbind::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 ⇒ Cv::KeyPoint
method wrapper for cv::KeyPoint std::vectorcv::KeyPoint::back()
35911 35912 35913 35914 35915 35916 35917 35918 35919 |
# File 'lib/ropencv/ropencv_types.rb', line 35911 def back() __validate_pointer__ result = Rbind::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::vectorcv::KeyPoint::capacity()
35849 35850 35851 35852 |
# File 'lib/ropencv/ropencv_types.rb', line 35849 def capacity() __validate_pointer__ Rbind::std_vector_cv_key_point_capacity( self) end |
#clear ⇒ Void
method wrapper for void std::vectorcv::KeyPoint::clear()
35842 35843 35844 35845 |
# File 'lib/ropencv/ropencv_types.rb', line 35842 def clear() __validate_pointer__ Rbind::std_vector_cv_key_point_clear( self) end |
#data ⇒ Void
method wrapper for void* std::vectorcv::KeyPoint::data()
35923 35924 35925 35926 |
# File 'lib/ropencv/ropencv_types.rb', line 35923 def data() __validate_pointer__ Rbind::std_vector_cv_key_point_data( self) end |
#delete_if(&block) ⇒ Object
35980 35981 35982 35983 35984 35985 35986 35987 |
# File 'lib/ropencv/ropencv_types.rb', line 35980 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
35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 |
# File 'lib/ropencv/ropencv_types.rb', line 35966 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::vectorcv::KeyPoint::empty()
35856 35857 35858 35859 |
# File 'lib/ropencv/ropencv_types.rb', line 35856 def empty() __validate_pointer__ Rbind::std_vector_cv_key_point_empty( self) end |
#front ⇒ Cv::KeyPoint
method wrapper for cv::KeyPoint std::vectorcv::KeyPoint::front()
35899 35900 35901 35902 35903 35904 35905 35906 35907 |
# File 'lib/ropencv/ropencv_types.rb', line 35899 def front() __validate_pointer__ result = Rbind::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 ⇒ Cv::KeyPoint
method wrapper for cv::KeyPoint std::vectorcv::KeyPoint::operator
35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 |
# File 'lib/ropencv/ropencv_types.rb', line 35955 def [](size) validate_index(size) __validate_pointer__ result = Rbind::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::vectorcv::KeyPoint::pop_back()
35938 35939 35940 35941 |
# File 'lib/ropencv/ropencv_types.rb', line 35938 def pop_back() __validate_pointer__ Rbind::std_vector_cv_key_point_pop_back( self) end |
#push_back(other) ⇒ Void
method wrapper for void std::vectorcv::KeyPoint::push_back(cv::KeyPoint other)
35931 35932 35933 35934 |
# File 'lib/ropencv/ropencv_types.rb', line 35931 def push_back(other) __validate_pointer__ Rbind::std_vector_cv_key_point_push_back( self, other) end |
#reserve(size) ⇒ Void
method wrapper for void std::vectorcv::KeyPoint::reserve(size_t size)
35864 35865 35866 35867 |
# File 'lib/ropencv/ropencv_types.rb', line 35864 def reserve(size) __validate_pointer__ Rbind::std_vector_cv_key_point_reserve( self, size) end |
#resize(size, val = Cv::KeyPoint.new()) ⇒ Void
method wrapper for void std::vectorcv::KeyPoint::resize(size_t size, cv::KeyPoint val = cv::KeyPoint())
methods
35828 35829 35830 35831 |
# File 'lib/ropencv/ropencv_types.rb', line 35828 def resize(size, val = Cv::KeyPoint.new()) __validate_pointer__ Rbind::std_vector_cv_key_point_resize( self, size, val) end |
#size ⇒ Size_T
method wrapper for size_t std::vectorcv::KeyPoint::size()
35835 35836 35837 35838 |
# File 'lib/ropencv/ropencv_types.rb', line 35835 def size() __validate_pointer__ Rbind::std_vector_cv_key_point_size( self) end |
#swap(other) ⇒ Void
method wrapper for void std::vectorcv::KeyPoint::swap(std::vectorcv::KeyPoint other)
35946 35947 35948 35949 |
# File 'lib/ropencv/ropencv_types.rb', line 35946 def swap(other) __validate_pointer__ Rbind::std_vector_cv_key_point_swap( self, other) end |
#to_s ⇒ Object
converts Vector::Cv_KeyPoint into a string by crawling through all its attributes
35815 35816 35817 |
# File 'lib/ropencv/ropencv_types.rb', line 35815 def to_s "#<std::vector<cv::KeyPoint> >" end |
#validate_index(idx) ⇒ Object
35961 35962 35963 35964 35965 |
# File 'lib/ropencv/ropencv_types.rb', line 35961 def validate_index(idx) if idx < 0 || idx >= size raise RangeError,"#{idx} is out of range [0..#{size-1}]" end end |