Class: OpenCV::Cv::TrackerGOTURN

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

Defined Under Namespace

Classes: Params

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(parameters = Cv::TrackerGOTURN::Params.new()) ⇒ Cv::Ptr::Cv_TrackerGOTURN

Note:

wrapper for static method const cv::Ptrcv::TrackerGOTURN cv::TrackerGOTURN::create(const cv::TrackerGOTURN::Params parameters = TrackerGOTURN::Params())

methods

Parameters:

Returns:



45354
45355
45356
# File 'lib/ropencv/ropencv_types.rb', line 45354

def self.create(parameters = Cv::TrackerGOTURN::Params.new())
    Rbind::cv_trackergoturn_create(parameters)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


45269
45270
45271
45272
45273
45274
45275
45276
# File 'lib/ropencv/ropencv_types.rb', line 45269

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

.nullObject

returns a null pointer to the object



45265
45266
45267
# File 'lib/ropencv/ropencv_types.rb', line 45265

def self.null
    new(TrackerGOTURNStruct.new)
end

Instance Method Details

#cast_to_tracker(parse_ownership) ⇒ Cv::Tracker Also known as: castToTracker

Note:

method wrapper for cv::Tracker* cv::TrackerGOTURN::castToTracker(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



45361
45362
45363
45364
45365
45366
45367
45368
45369
# File 'lib/ropencv/ropencv_types.rb', line 45361

def cast_to_tracker(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_trackergoturn_cast_to_tracker( self, parse_ownership)
    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

#init(image, bounding_box) ⇒ Void

Note:

method wrapper for void cv::TrackerGOTURN::init(const cv::Mat image, const cv::Rect boundingBox)

Parameters:

Returns:

  • (Void)


45376
45377
45378
45379
# File 'lib/ropencv/ropencv_types.rb', line 45376

def init(image, bounding_box)
    __validate_pointer__
    Rbind::cv_trackergoturn_init( self, image, bounding_box)
end

#to_sObject

converts TrackerGOTURN into a string by crawling through all its attributes



45342
45343
45344
# File 'lib/ropencv/ropencv_types.rb', line 45342

def to_s
    "#<cv::TrackerGOTURN >"
end

#update(image, bounding_box) ⇒ Bool

Note:

method wrapper for bool cv::TrackerGOTURN::update(const cv::Mat image, cv::Rect& boundingBox)

Parameters:

Returns:

  • (Bool)


45385
45386
45387
45388
# File 'lib/ropencv/ropencv_types.rb', line 45385

def update(image, bounding_box)
    __validate_pointer__
    Rbind::cv_trackergoturn_update( self, image, bounding_box)
end