Class: OpenCV::Cv::TermCriteria
- Inherits:
-
Object
- Object
- OpenCV::Cv::TermCriteria
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Constants collapse
- COUNT =
1
- MAX_ITER =
COUNT
- EPS =
2
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
-
#to_s ⇒ Object
converts TermCriteria into a string by crawling through all its attributes.
Class Method Details
.term_criteria(type, max_count, epsilon) ⇒ Object .term_criteria(type, max_count, epsilon) ⇒ Object
11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 |
# File 'lib/ropencv/ropencv_types.rb', line 11395 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(TermCriteriaStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # overloaded method wrapper for cv::TermCriteria::TermCriteria(int type, int maxCount, double epsilon) @@cv_term_criteria_term_criteria_defaults0 ||= [nil, nil, nil] if(args.size >= 3 && args.size <= 3) targs = args.clone targs.size.upto(2) do |i| targs[i] = @@cv_term_criteria_term_criteria_defaults0[i] end begin return Rbind::cv_term_criteria_term_criteria(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::TermCriteria::TermCriteria(int type, int maxCount, double epsilon) @@cv_term_criteria_term_criteria2_defaults1 ||= [nil, nil, nil] if(args.size >= 3 && args.size <= 3) targs = args.clone targs.size.upto(2) do |i| targs[i] = @@cv_term_criteria_term_criteria2_defaults1[i] end begin return Rbind::cv_term_criteria_term_criteria2(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
11382 11383 11384 |
# File 'lib/ropencv/ropencv_types.rb', line 11382 def self.null new(TermCriteriaStruct.new) end |
Instance Method Details
#to_s ⇒ Object
converts TermCriteria into a string by crawling through all its attributes
11495 11496 11497 |
# File 'lib/ropencv/ropencv_types.rb', line 11495 def to_s "#<cv::TermCriteria >" end |