Class: OpenCV::CvParamGrid

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ruby/ropencv/ropencv_types.rb

Constants collapse

SVM_C =
0
SVM_GAMMA =
1
SVM_P =
2
SVM_NU =
3
SVM_COEF =
4
SVM_DEGREE =
5

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ CvParamGrid

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CvParamGrid.



19642
19643
19644
19645
19646
19647
19648
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19642

def initialize(ptr)
    @__obj_ptr__ = if ptr.is_a? CvParamGridStruct
                       ptr
                   else
                       CvParamGridStruct.new(FFI::AutoPointer.new(ptr,CvParamGridStruct.method(:release)))
                   end
end

Instance Attribute Details

#__obj_ptr__Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19639
19640
19641
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19639

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

.from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



19634
19635
19636
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19634

def self.from_native(ptr,context)
    rbind_from_native(ptr,context)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


19603
19604
19605
19606
19607
19608
19609
19610
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19603

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

.rbind_from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19622
19623
19624
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19622

def self.rbind_from_native(ptr,context)
    CvParamGrid.new(ptr)
end

.rbind_to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19613
19614
19615
19616
19617
19618
19619
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19613

def self.rbind_to_native(obj,context)
    if obj.is_a? CvParamGrid
        obj.__obj_ptr__
    else
        raise TypeError, "expected kind of #{name}, was #{obj.class}"
    end
end

.to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



19628
19629
19630
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19628

def self.to_native(obj,context)
    rbind_to_native(obj,context)
end

Instance Method Details

#__owner__?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

returns true if the underlying pointer is owner of the real object

Returns:

  • (Boolean)


19653
19654
19655
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19653

def __owner__?
    @__obj_ptr__[:bowner]
end

#max_valObject

wrapper for double max_val



19683
19684
19685
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19683

def max_val()
    Rbind::cv_param_grid_get_max_val( self)
end

#max_val=(value) ⇒ Object

wrapper for double max_val



19688
19689
19690
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19688

def max_val=(value)
    Rbind::cv_param_grid_set_max_val( self, value)
end

#min_valObject

methods wrapper for double min_val



19673
19674
19675
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19673

def min_val()
    Rbind::cv_param_grid_get_min_val( self)
end

#min_val=(value) ⇒ Object

wrapper for double min_val



19678
19679
19680
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19678

def min_val=(value)
    Rbind::cv_param_grid_set_min_val( self, value)
end

#stepObject

wrapper for double step



19693
19694
19695
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19693

def step()
    Rbind::cv_param_grid_get_step( self)
end

#step=(value) ⇒ Object

wrapper for double step



19698
19699
19700
# File 'lib/ruby/ropencv/ropencv_types.rb', line 19698

def step=(value)
    Rbind::cv_param_grid_set_step( self, value)
end