Class: OpenCV::Cv::GridAdaptedFeatureDetector

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ GridAdaptedFeatureDetector

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 GridAdaptedFeatureDetector.



10981
10982
10983
10984
10985
10986
10987
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10981

def initialize(ptr)
    @__obj_ptr__ = if ptr.is_a? GridAdaptedFeatureDetectorStruct
                       ptr
                   else
                       GridAdaptedFeatureDetectorStruct.new(FFI::AutoPointer.new(ptr,GridAdaptedFeatureDetectorStruct.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.



10978
10979
10980
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10978

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

._create(name) ⇒ Object

wrapper for Ptr_Algorithm cv::GridAdaptedFeatureDetector::_create(const cv::String name)



11126
11127
11128
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11126

def self._create(name)
    Rbind::cv_grid_adapted_feature_detector__create(name)
end

.create(detector_type) ⇒ Object

wrapper for Ptr_FeatureDetector cv::GridAdaptedFeatureDetector::create(const cv::String detectorType)



11016
11017
11018
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11016

def self.create(detector_type)
    Rbind::cv_grid_adapted_feature_detector_create(detector_type)
end

.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



10973
10974
10975
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10973

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

.get_list(algorithms) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::getList(vector_string algorithms)



11121
11122
11123
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11121

def self.get_list(algorithms)
    Rbind::cv_grid_adapted_feature_detector_get_list(algorithms)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10930

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(GridAdaptedFeatureDetectorStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # wrapper for cv::GridAdaptedFeatureDetector::GridAdaptedFeatureDetector(const Ptr_FeatureDetector detector=0, int maxTotalKeypoints=1000, int gridRows=4, int gridCols=4)
    @@cv_grid_adapted_feature_detector_grid_adapted_feature_detector_defaults0 ||= [0, 1000, 4, 4]
    if(args.size >= 0 && args.size <= 4)
        args.size.upto(3) do |i|
            args[i] = @@cv_grid_adapted_feature_detector_grid_adapted_feature_detector_defaults0[i]
        end
        begin
            return Rbind::cv_grid_adapted_feature_detector_grid_adapted_feature_detector(*args)
        rescue TypeError => e
            @error = e
        end
    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.



10961
10962
10963
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10961

def self.rbind_from_native(ptr,context)
    GridAdaptedFeatureDetector.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.



10952
10953
10954
10955
10956
10957
10958
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10952

def self.rbind_to_native(obj,context)
    if obj.is_a? GridAdaptedFeatureDetector
        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



10967
10968
10969
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10967

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)


10992
10993
10994
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10992

def __owner__?
    @__obj_ptr__[:bowner]
end

#detect(image, keypoints, mask = Cv::Mat.new()) ⇒ Object

methods wrapper for void cv::GridAdaptedFeatureDetector::detect(const cv::Mat image, vector_KeyPoint keypoints, const cv::Mat mask=Mat())



11006
11007
11008
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11006

def detect(image, keypoints, mask = Cv::Mat.new())
    Rbind::cv_grid_adapted_feature_detector_detect( self, image, keypoints, mask)
end

#emptyObject

wrapper for bool cv::GridAdaptedFeatureDetector::empty()



11011
11012
11013
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11011

def empty()
    Rbind::cv_grid_adapted_feature_detector_empty( self)
end

#get_algorithm(name) ⇒ Object

wrapper for Ptr_Algorithm cv::GridAdaptedFeatureDetector::getAlgorithm(const cv::String name)



11060
11061
11062
11063
11064
11065
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11060

def get_algorithm(name)
    result = Rbind::cv_grid_adapted_feature_detector_get_algorithm( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#get_bool(name) ⇒ Object

wrapper for bool cv::GridAdaptedFeatureDetector::getBool(const cv::String name)



11031
11032
11033
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11031

def get_bool(name)
    Rbind::cv_grid_adapted_feature_detector_get_bool( self, name)
end

#get_double(name) ⇒ Object

wrapper for double cv::GridAdaptedFeatureDetector::getDouble(const cv::String name)



11026
11027
11028
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11026

def get_double(name)
    Rbind::cv_grid_adapted_feature_detector_get_double( self, name)
end

#get_int(name) ⇒ Object

wrapper for int cv::GridAdaptedFeatureDetector::getInt(const cv::String name)



11021
11022
11023
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11021

def get_int(name)
    Rbind::cv_grid_adapted_feature_detector_get_int( self, name)
end

#get_mat(name) ⇒ Object

wrapper for cv::Mat cv::GridAdaptedFeatureDetector::getMat(const cv::String name)



11044
11045
11046
11047
11048
11049
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11044

def get_mat(name)
    result = Rbind::cv_grid_adapted_feature_detector_get_mat( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#get_mat_vector(name) ⇒ Object

wrapper for vector_Mat cv::GridAdaptedFeatureDetector::getMatVector(const cv::String name)



11052
11053
11054
11055
11056
11057
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11052

def get_mat_vector(name)
    result = Rbind::cv_grid_adapted_feature_detector_get_mat_vector( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#get_params(names) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::getParams(vector_string names)



11116
11117
11118
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11116

def get_params(names)
    Rbind::cv_grid_adapted_feature_detector_get_params( self, names)
end

#get_string(name) ⇒ Object

wrapper for cv::String cv::GridAdaptedFeatureDetector::getString(const cv::String name)



11036
11037
11038
11039
11040
11041
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11036

def get_string(name)
    result = Rbind::cv_grid_adapted_feature_detector_get_string( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#param_help(name) ⇒ Object

wrapper for cv::String cv::GridAdaptedFeatureDetector::paramHelp(const cv::String name)



11103
11104
11105
11106
11107
11108
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11103

def param_help(name)
    result = Rbind::cv_grid_adapted_feature_detector_param_help( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#param_type(name) ⇒ Object

wrapper for int cv::GridAdaptedFeatureDetector::paramType(const cv::String name)



11111
11112
11113
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11111

def param_type(name)
    Rbind::cv_grid_adapted_feature_detector_param_type( self, name)
end

#set_algorithm(name, value) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::setAlgorithm(const cv::String name, const Ptr_Algorithm value)



11098
11099
11100
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11098

def set_algorithm(name, value)
    Rbind::cv_grid_adapted_feature_detector_set_algorithm( self, name, value)
end

#set_bool(name, value) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::setBool(const cv::String name, bool value)



11078
11079
11080
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11078

def set_bool(name, value)
    Rbind::cv_grid_adapted_feature_detector_set_bool( self, name, value)
end

#set_double(name, value) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::setDouble(const cv::String name, double value)



11073
11074
11075
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11073

def set_double(name, value)
    Rbind::cv_grid_adapted_feature_detector_set_double( self, name, value)
end

#set_int(name, value) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::setInt(const cv::String name, int value)



11068
11069
11070
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11068

def set_int(name, value)
    Rbind::cv_grid_adapted_feature_detector_set_int( self, name, value)
end

#set_mat(name, value) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::setMat(const cv::String name, const cv::Mat value)



11088
11089
11090
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11088

def set_mat(name, value)
    Rbind::cv_grid_adapted_feature_detector_set_mat( self, name, value)
end

#set_mat_vector(name, value) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::setMatVector(const cv::String name, const vector_Mat value)



11093
11094
11095
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11093

def set_mat_vector(name, value)
    Rbind::cv_grid_adapted_feature_detector_set_mat_vector( self, name, value)
end

#set_string(name, value) ⇒ Object

wrapper for void cv::GridAdaptedFeatureDetector::setString(const cv::String name, const cv::String value)



11083
11084
11085
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11083

def set_string(name, value)
    Rbind::cv_grid_adapted_feature_detector_set_string( self, name, value)
end