Class: OpenCV::Cv::SimpleBlobDetector

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

Defined Under Namespace

Classes: Params, ParamsStruct

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ SimpleBlobDetector

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



10464
10465
10466
10467
10468
10469
10470
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10464

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



10461
10462
10463
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10461

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

._create(name) ⇒ Object

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



10609
10610
10611
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10609

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

.create(detector_type) ⇒ Object

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



10499
10500
10501
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10499

def self.create(detector_type)
    Rbind::cv_simple_blob_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



10456
10457
10458
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10456

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

.get_list(algorithms) ⇒ Object

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



10604
10605
10606
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10604

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

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10413

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(SimpleBlobDetectorStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # wrapper for cv::SimpleBlobDetector::SimpleBlobDetector(const cv::SimpleBlobDetector::Params parameters=SimpleBlobDetector::Params())
    @@cv_simple_blob_detector_simple_blob_detector_defaults0 ||= [Cv::SimpleBlobDetector::Params.new()]
    if(args.size >= 0 && args.size <= 1)
        args.size.upto(0) do |i|
            args[i] = @@cv_simple_blob_detector_simple_blob_detector_defaults0[i]
        end
        begin
            return Rbind::cv_simple_blob_detector_simple_blob_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.



10444
10445
10446
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10444

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



10435
10436
10437
10438
10439
10440
10441
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10435

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



10450
10451
10452
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10450

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)


10475
10476
10477
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10475

def __owner__?
    @__obj_ptr__[:bowner]
end

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

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



10489
10490
10491
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10489

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

#emptyObject

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



10494
10495
10496
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10494

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

#get_algorithm(name) ⇒ Object

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



10543
10544
10545
10546
10547
10548
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10543

def get_algorithm(name)
    result = Rbind::cv_simple_blob_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::SimpleBlobDetector::getBool(const cv::String name)



10514
10515
10516
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10514

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

#get_double(name) ⇒ Object

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



10509
10510
10511
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10509

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

#get_int(name) ⇒ Object

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



10504
10505
10506
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10504

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

#get_mat(name) ⇒ Object

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



10527
10528
10529
10530
10531
10532
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10527

def get_mat(name)
    result = Rbind::cv_simple_blob_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::SimpleBlobDetector::getMatVector(const cv::String name)



10535
10536
10537
10538
10539
10540
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10535

def get_mat_vector(name)
    result = Rbind::cv_simple_blob_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::SimpleBlobDetector::getParams(vector_string names)



10599
10600
10601
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10599

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

#get_string(name) ⇒ Object

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



10519
10520
10521
10522
10523
10524
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10519

def get_string(name)
    result = Rbind::cv_simple_blob_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::SimpleBlobDetector::paramHelp(const cv::String name)



10586
10587
10588
10589
10590
10591
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10586

def param_help(name)
    result = Rbind::cv_simple_blob_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::SimpleBlobDetector::paramType(const cv::String name)



10594
10595
10596
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10594

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

#set_algorithm(name, value) ⇒ Object

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



10581
10582
10583
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10581

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

#set_bool(name, value) ⇒ Object

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



10561
10562
10563
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10561

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

#set_double(name, value) ⇒ Object

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



10556
10557
10558
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10556

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

#set_int(name, value) ⇒ Object

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



10551
10552
10553
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10551

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

#set_mat(name, value) ⇒ Object

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



10571
10572
10573
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10571

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

#set_mat_vector(name, value) ⇒ Object

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



10576
10577
10578
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10576

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

#set_string(name, value) ⇒ Object

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



10566
10567
10568
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10566

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